Is there a better way to do this in jQuery? Depending on the end part of a href I'm running some code. The current version sure is ugly...
$(document).ready(function(){
$('a[href$="pdf"], a[href$="zip"], a[href$="doc"], a[href$="docx"], a[href$="xls"], a[href$="xlsx"], a[href$="ppt"], a[href$="pptx"], a[href$="mp3"], a[href$="txt"], a[href$="vsd"], a[href$="rar"], a[href$="wma"], a[href$="avi"], a[href$="mmv"]').bind("click", function() {
// do processing here
});
});
I am unable to add ID or class attributes as the html is generated by a CMS