Hi
I am learning jQuery and I have a function which adds an image to a link depending on the file type.
$("document").ready(function(){
$('#content a[href$="pdf"]').addClass("pdf");
$('#content a[href$="xls"]').addClass("xls");
$('#content a[href$="doc"]').addClass("word");
$('#content a[href$="ppt"]').addClass("ppt");
});
Straightforward enough.
I need help with how to write a statement that says....if there is no file extension - leave the default styling, if not add file extension. At the moment I have dots and images...see here http://www.theoldcourthousesurgery.n..._us/index.shtm
Thanks









Bookmarks