Skip to content

Commit

Permalink
Revert "Support for Internet Explorer"
Browse files Browse the repository at this point in the history
This reverts commit ff8a307.
  • Loading branch information
abitgone committed Aug 8, 2012
1 parent 00ed2c1 commit fcd7dc1
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions ClassToggle/abitgone-classtoggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,20 @@

classToggle: function (option) {

var sender = event.target ? event.target : window.event.srcElement;
$sender = $(sender);

$sender = $(event.target);

var tcClass = $sender.attr('data-classtoggle-class');
var tcClassAlt = $sender.attr('data-classtoggle-altclass');
var tcTriggerClass = $sender.attr('data-classtoggle-trigger-activeclass');
var tcTriggerSelector = $sender.attr('data-classtoggle-trigger-selector');
var target = $sender.attr('data-classtoggle-target');

if (target == undefined) {
target = $sender.attr('href') == undefined ? $sender.attr('href') : $sender[0].href;
target = $sender.attr('href');
target = target.replace(/.*(?=#[^\s]+$)/, ''); // Strip for IE7
}
if (target == undefined) return;
var $target = $(target);

if (tcClass == undefined || $target == undefined) return;

var targetMain = $target.hasClass(tcClass);
Expand Down Expand Up @@ -130,4 +128,4 @@
})
});

}(window.jQuery);
}(window.jQuery);

0 comments on commit fcd7dc1

Please sign in to comment.