Skip to content

Instantly share code, notes, and snippets.

@JayDouglass
Created March 25, 2013 21:59
Show Gist options
  • Save JayDouglass/5241190 to your computer and use it in GitHub Desktop.
Save JayDouglass/5241190 to your computer and use it in GitHub Desktop.
Generic way to find ASP control ids
String.prototype.endsWith = function(str) {
return (this.match(str + '$') == str)
}
jQuery.expr[":"].asp = function(a, i, m) {
return jQuery(a).attr('id') && jQuery(a).attr('id').endsWith(m[3]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment