Welcome Guest, Not a member yet? Register   Sign In
Hide Dropdowns from each other with if statement???
#2

[eluser]xwero[/eluser]
That is simple code with jQuery
Code:
$('#dropdown1, #dropdown2').click(function(){ // catch click event for the two dropdowns
   var clicked = $(this).attr('id').replace(/dropdown/,''); // get number of dropdown
   var notclicked = (clicked == 1)?2:1; //
   $('#dropdown'+notclicked).attr('disabled',TRUE); // disable not clicked dropdown
});
It a little more complicated when you want to re-enable the dropdown when the no value option is choosen.


Messages In This Thread
Hide Dropdowns from each other with if statement??? - by El Forum - 08-24-2008, 06:26 AM
Hide Dropdowns from each other with if statement??? - by El Forum - 08-24-2008, 09:16 AM
Hide Dropdowns from each other with if statement??? - by El Forum - 09-04-2008, 01:18 PM
Hide Dropdowns from each other with if statement??? - by El Forum - 09-05-2008, 06:25 PM
Hide Dropdowns from each other with if statement??? - by El Forum - 09-05-2008, 07:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB