Skip to content

Instantly share code, notes, and snippets.

@bgrins
Created August 6, 2010 14:21
Show Gist options
  • Save bgrins/511375 to your computer and use it in GitHub Desktop.
Save bgrins/511375 to your computer and use it in GitHub Desktop.
/*
http://lanitdev.wordpress.com/2009/06/08/extending-jquery-to-select-asp-controls/
Enables $(":asp(id)") selector in jQuery for dealing with ASP Server IDs in JavaScript
Example: $(":asp(txtPhoneNumber)")
*/
jQuery.expr[':'].asp = function(elem, i, match) {
return (elem.id && elem.id.match(match[3] + "$"));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment