]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
changed attr('data-target') to data('target'); 10519/head
authorAlexey <zbinyakov@gmail.com>
Sun, 8 Sep 2013 01:49:27 +0000 (04:49 +0300)
committerAlexey <zbinyakov@gmail.com>
Sun, 8 Sep 2013 01:49:27 +0000 (04:49 +0300)
this will extend js interface, to be possible to setup targets for tabs as
    var content=$('<div class="tab-pane">',{text: 'content'});
    var tab=('<li>',{html: $('<a>',{text: 'Main options'})}).addClass('active').data({target: $main,toggle: 'tab'}).appendTo(tabs);

js/tab.js

index e1c155920f2e329edac04fa3587c013bff4ef67f..10dc7e99bcc93256229ec10a1fb889dd6f18164c 100644 (file)
--- a/js/tab.js
+++ b/js/tab.js
@@ -30,7 +30,7 @@
   Tab.prototype.show = function () {
     var $this    = this.element
     var $ul      = $this.closest('ul:not(.dropdown-menu)')
-    var selector = $this.attr('data-target')
+    var selector = $this.data('target')
 
     if (!selector) {
       selector = $this.attr('href')