I am working on an 3rd party application , which render many <a>
links, as follow:
here is the markup for the above 2 links which i marked in yellow:
now i want to write a jquery code which will get fired when the user clicks on the above 2 links. so if user click on "Operational Procedures" link to call a function named "showDialog1", while if user click on "Work Instructions" link to call a function name "showDialog2". here is a sample of the function that will be called, which will mainly show the page inside a dialog box:
<script type="text/javascript" unselectable="on">
function showDialog2() {
var options = {
url: "/Pages/Work-Instructions.aspx",
width: 800,
height: 775,
title: "Work Instructions"
};
showModalDialog(options);
}
now to make my code robust to being fired on nu-intended links. So is there a way to define the following jQuery selector:
<a>
links which have specific text inside its href.- the
<a>
should be under an<li>