I have a dynamic href that does not have a class or id and I need to accomplish 2 things. First I need to be able to identify that the href is qualify.
Something along the lines of if
$("a[href*='somestring']")
do this:
captures whole href tag and prepends to it.
Is this possible?
You can use the
attr()method with a function argument to modify the attribute instead of replacing it:http://jsfiddle.net/mblase75/fXUNE/