I am using the following selector:
$('a[data-href="/C003Q/History"]').click(function(){
alert("clicked");
});
This finds the link with the above data-href attribute and clicks it. However I need to do something slightly different. What I have is a variable that has something like the following stored:
/Admin/Contents/Edit?pk=0103000&rk=0047
How can I take the four characters after the rk= and search for a link that has a data-href that starts with “/C” followed by those four characters and send a click to it?
you need to use split and use both start with and end with selector.