Skip to content

Commit

Permalink
jQuery.fn.scopedPolyFill
Browse files Browse the repository at this point in the history
It's a 3 line plugin, so I don't see much harm in including it.  It'll just make it a bit easier to integrate in applications using jQuery.
  • Loading branch information
brigand committed Oct 8, 2013
1 parent eaebe56 commit e879152
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scoped.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ var scopedPolyFill = ( function ( doc, undefined ) {
}
}
}

// Expose it as a jQuery function for convenience
if (typeof jQuery === "function" && typeof jQuery.fn === "object") {
jQuery.fn.scopedPolyFill = function(){
return this.each(scopeIt);
}
}

return scopeIt;

Expand Down

0 comments on commit e879152

Please sign in to comment.