var pageName = "foobar.html";
var link = $("a[href$='" + pageName + "']");
link.addClass('selected');

Reply via email to