Skip to content

Instantly share code, notes, and snippets.

@sahina
Created July 26, 2014 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sahina/a472d5d85ab3f4d704bc to your computer and use it in GitHub Desktop.
Save sahina/a472d5d85ab3f4d704bc to your computer and use it in GitHub Desktop.
JS: IE Detection
// IE9 + but Modernizr has polyfill for function.bind
// Hat tip Paul Irish
var o = $( {} );
$.subscribe = o.on.bind(o);
$.unsubscribe = o.off.bind(o);
$.publish = o.trigger.bind(o);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment