Mercurial > hg > rr-repo
annotate sites/all/modules/quicktabs/js/qt_accordion.js @ 11:b0ee71395280
deleted .DS_Store files
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Mon, 28 Oct 2013 16:12:13 +0000 |
parents | b74b41bb73f0 |
children |
rev | line source |
---|---|
danielebarchiesi@2 | 1 (function ($) { |
danielebarchiesi@2 | 2 |
danielebarchiesi@2 | 3 Drupal.behaviors.qt_accordion = { |
danielebarchiesi@2 | 4 attach: function (context, settings) { |
danielebarchiesi@2 | 5 $('.quick-accordion', context).once(function(){ |
danielebarchiesi@2 | 6 var id = $(this).attr('id'); |
danielebarchiesi@2 | 7 var qtKey = 'qt_' + this.id.substring(this.id.indexOf('-') +1); |
danielebarchiesi@2 | 8 var options = settings.quicktabs[qtKey].options; |
danielebarchiesi@2 | 9 |
danielebarchiesi@2 | 10 options.active = parseInt(settings.quicktabs[qtKey].active_tab); |
danielebarchiesi@2 | 11 if (settings.quicktabs[qtKey].history) { |
danielebarchiesi@2 | 12 options.event = 'change'; |
danielebarchiesi@2 | 13 $(this).accordion(options); |
danielebarchiesi@2 | 14 Drupal.quicktabsBbq($(this), 'h3 a', 'h3'); |
danielebarchiesi@2 | 15 } |
danielebarchiesi@2 | 16 else { |
danielebarchiesi@2 | 17 $(this).accordion(options); |
danielebarchiesi@2 | 18 } |
danielebarchiesi@2 | 19 }); |
danielebarchiesi@2 | 20 } |
danielebarchiesi@2 | 21 } |
danielebarchiesi@2 | 22 |
danielebarchiesi@2 | 23 })(jQuery); |