Created
April 21, 2011 21:32
-
-
Save kevinsmith/935540 to your computer and use it in GitHub Desktop.
Some JS to allow a dropdown panel to slide out as long as the link's class name matches the panel's ID name.
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
$(document).ready(function(){ | |
// Owner's Box animation | |
$('#owners_box ul a, .outside_donations').click(function() { | |
$('#dimmedBG').fadeIn(150); | |
var className = $(this).attr("class"); | |
var idName = "#"+className; | |
$('.owners_dropdown').not(idName).fadeOut(100, function() { | |
$(idName).slideDown(400, function() { | |
if (idName == "#outside_donations") { $('input.donation').focus(); } | |
}); | |
// Fade animation complete. | |
}); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment