Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Replicates .activate() from the Prototype JS library.
jQuery.fn.activate = function() {
if ('focus' in this) this.focus();
if ('select' in this && (this.tagName != 'INPUT' || !(/^(?:button|reset|submit)$/i.test(this.type)))) {;
return this;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment