On my intranet page, I have links which end with .doc or .xls.
How do I use jQuery to check if they end with .xls so I can add a little javascript to those links
EDIT:
This does not work:
$("a.resultLink").live('click', function(event)
{
// do something here
// ...
// change .doc link behaviour
var anchor = $("a:contains('.doc')");
if (anchor){
event.preventDefault();
alert("this is a doc");
}
// do something else here
// ...
});