demo.admin.js 520 B

12345678910111213141516171819202122
  1. // $Id: demo.admin.js,v 1.1 2010/08/30 14:30:49 sun Exp $
  2. (function ($) {
  3. /**
  4. * Collapsible snapshots.
  5. */
  6. Drupal.behaviors.demoCollapse = {
  7. attach: function (context) {
  8. $('.demo-snapshots-widget .form-item-filename', context).once('demo-collapse', function () {
  9. var $item = $(this);
  10. $item
  11. .find('label')
  12. .click(function () {
  13. $item.find('.description').slideToggle('fast');
  14. })
  15. .end()
  16. .find('.description').hide();
  17. });
  18. }
  19. };
  20. })(jQuery);