Created
February 18, 2012 11:28
-
-
Save piatra/1858900 to your computer and use it in GitHub Desktop.
show hide for Agenda de deputati
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $senator = $('.office-senator') | |
, $deputat = $('.office-deputy'); | |
$('select').click(function(){ | |
var value = $(this).val().trim(); | |
if(value == 'all') { | |
$senator.show(); | |
$deputat.show(); | |
} | |
if(value == 'office-deputy') { | |
showDeputat(); | |
} | |
if(value == 'office-senator') { | |
showSenator(); | |
} | |
}) | |
var showDeputat = function() { | |
$deputat.show(); | |
$senator.fadeOut(500).delay(100).queue(function(next){ | |
$(this).hide(); | |
next(); | |
}); | |
} | |
var showSenator = function() { | |
$senator.show(); | |
$deputat.fadeOut(500).delay(100).queue(function(next){ | |
$(this).hide(); | |
next(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment