I\'m considering one selection statement that would target one of many css class names in a single class attribute value based on a string prefix.
For example, I wan
You could also write a small plugin that uses .map() to walk through the classes.
$.fn.classBeginsWith = function(str){
return !str ? this : this.filter( function(){
return $.map(this.className.split(' '), function(e,i){
if (e.match(new RegExp('^' + str, 'ig'))) return 1;
}).length;
});
}
And then:
$('a').classBeginsWith('detail-')