Skip to content

Commit

Permalink
$event.remove supported reomve multiple events
Browse files Browse the repository at this point in the history
  • Loading branch information
qatrix committed Sep 3, 2012
1 parent 26a29d2 commit 508e104
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions qatrix.js
Expand Up @@ -506,11 +506,27 @@ var version = '1.0pre',
remove: document.removeEventListener ?
function (elem, type, handler)
{
if (typeof type === 'object')
{
$each(type, function (type, handler)
{
$event.remove(elem, type, handler);
});
return elem;
}
elem.removeEventListener(type, handler, false);
return elem;
}:
function (elem, type, handler)
{
if (typeof type === 'object')
{
$each(type, function (type, handler)
{
$event.remove(elem, type, handler);
});
return elem;
}
elem.detachEvent('on' + type, handler);
if (elem.removeAttribute)
{
Expand Down

0 comments on commit 508e104

Please sign in to comment.