Created
June 16, 2011 16:34
-
-
Save jeremyboggs/1029640 to your computer and use it in GitHub Desktop.
Quick script to show/hide Omeka element texts if you click on that element's heading.
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
jQuery(document).ready(function($){ | |
// Hide all the element texts to start. | |
$('.element-set .element-text').hide(); | |
// When you click a h3 inside a .element, show it's sibling .element-text div. | |
// Also adds some CSS at the end to use the pointer cursor. | |
$('.element-set .element h3').click(function(){ | |
$(this).siblings('.element-text').toggle('slow'); | |
}).css({'cursor': 'pointer'}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment