I need to iterate through all anchors on a page with specific hrefs and replace the href contents using jquery.
I need this:
<a onfocus="OnLink(this)" href='javascript:CoreInvoke("MtgNavigate","20131211");' target="_self"><u>12/11/2013</u></a>
to be replaced with this:
<a onfocus="OnLink(this)" href='javascript:MtgNavigate("20131211");' target="_self"><u>12/11/2013</u></a>
Basically, I want to replace CoreInvoke with MtgNavigate and remove the MtgNavigate as a parameter.
Each link though will have a different number in the second parameter of the original link. Any ideas how I can do this?
Check this fiddle.
The fiddle will execute on page ready. If you need to do this after any event means create a function and trigger on the event execution.