Mercurial > hg > rr-repo
comparison sites/all/modules/quicktabs/js/qt_accordion.js @ 2:b74b41bb73f0
-- Google analytics module
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Thu, 22 Aug 2013 17:22:54 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1:67ce89da90df | 2:b74b41bb73f0 |
---|---|
1 (function ($) { | |
2 | |
3 Drupal.behaviors.qt_accordion = { | |
4 attach: function (context, settings) { | |
5 $('.quick-accordion', context).once(function(){ | |
6 var id = $(this).attr('id'); | |
7 var qtKey = 'qt_' + this.id.substring(this.id.indexOf('-') +1); | |
8 var options = settings.quicktabs[qtKey].options; | |
9 | |
10 options.active = parseInt(settings.quicktabs[qtKey].active_tab); | |
11 if (settings.quicktabs[qtKey].history) { | |
12 options.event = 'change'; | |
13 $(this).accordion(options); | |
14 Drupal.quicktabsBbq($(this), 'h3 a', 'h3'); | |
15 } | |
16 else { | |
17 $(this).accordion(options); | |
18 } | |
19 }); | |
20 } | |
21 } | |
22 | |
23 })(jQuery); |