Mercurial > hg > MPIWG-drupal-modules
view sites/all/modules/custom/solrsearch/solrsearch-mpiwg.js @ 0:015d06b10d37 default tip
initial
author | dwinter |
---|---|
date | Wed, 31 Jul 2013 13:49:13 +0200 |
parents | |
children |
line wrap: on
line source
/* * Javascript for MPIWG website */ (function ($) { $(document).ready(function() { /* * autosubmit forms */ $('form.autosubmit').find('.autosubmit').change(function() { this.form.submit(); }); // hide submit button $('form.autosubmit input[type="submit"].autosubmit').hide(); /* * foldout divs */ $('.foldable').each(function() { var $this = $(this); var $head = $this.find('.fold_head'); var $img = $head.find('img'); var $body = $this.find('.fold_body'); $head.on('click', function() { $body.slideToggle('fast'); $img.toggle(); }).css('cursor', 'pointer'); if (! $this.hasClass('initially_open')) { // hide body initially $body.hide(); $img.toggle(); } }); }); })(jQuery);