Mercurial > hg > rr-repo
diff sites/all/modules/quicktabs/js/quicktabs_form.js @ 2:b74b41bb73f0
-- Google analytics module
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Thu, 22 Aug 2013 17:22:54 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sites/all/modules/quicktabs/js/quicktabs_form.js Thu Aug 22 17:22:54 2013 +0100 @@ -0,0 +1,17 @@ +(function ($) { + +Drupal.quicktabsShowHide = function() { + $(this).parents('tr').find('div.qt-tab-' + this.value + '-options-form').show().siblings('div.qt-tab-options-form').hide(); +}; + +Drupal.behaviors.quicktabsform = { + attach: function (context, settings) { + $('#quicktabs-form tr').once(function(){ + var currentRow = $(this); + currentRow.find('div.form-item :input[name*="type"]').bind('click', Drupal.quicktabsShowHide); + $(':input[name*="type"]:checked', this).trigger('click'); + }) + } +}; + +})(jQuery);