refiking Posted June 14, 2012 Share Posted June 14, 2012 So, here's the problem. I wrote a code that opens a div based on the selected dropdown. That works great. I then wanted to preselect a specific option ($_POST['value']). That works great. The problem comes in when I also want to have the correlating div to open as well. I can do one or the other, but never both together. Please show me what I'm supposed to do: var theText = "Printer Setup"; //$("#sow option:contains(" + theText + ")").attr('selected', 'selected'); $("#sow option:contains(" + theText + ")").attr('selected', 'selected')$('#divoption5').show(); Link to comment https://forums.phpfreaks.com/topic/264205-jquery-cant-get-both-actions-to-work-together/ Share on other sites More sharing options...
Mahngiel Posted June 15, 2012 Share Posted June 15, 2012 var theText = "Printer Setup"; //$("#sow option:contains(" + theText + ")").attr('selected', 'selected'); $("#sow option:contains(" + theText + ")").attr('selected', 'selected').$('#divoption5').show(); Link to comment https://forums.phpfreaks.com/topic/264205-jquery-cant-get-both-actions-to-work-together/#findComment-1354038 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.