Skip to content

Instantly share code, notes, and snippets.

@jeremyboggs
Created June 16, 2011 16:34
Show Gist options
  • Save jeremyboggs/1029640 to your computer and use it in GitHub Desktop.
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.
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