Asked by bongii
at 2024-08-09 05:00:19
Point:500 Replies:5 POST_ID:828726USER_ID:11614
Topic:
jQuery;;
Hi.
I have 2 links, but I only want the jquery script to work at all links who contains the word shop in the url.
<a target="_blank" href="untitled1.html">start</a>
<a target="_blank" href="shop/untitled1.html"></a>
My jQuery seems like:
$(document).ready(function(){
$('a[target="_blank"]').removeAttr('target');
});
I know I kan make a loop through all links on the page, but it will be slow. Can the jquery be changed to look like:
$('a[target="_blank"]').removeAttr('target').OnlyWhenLinkContains("shop") ; :)
I have 2 links, but I only want the jquery script to work at all links who contains the word shop in the url.
<a target="_blank" href="untitled1.html">start</a>
<a target="_blank" href="shop/untitled1.html"></a>
My jQuery seems like:
$(document).ready(function(){
$('a[target="_blank"]').removeAttr('target');
});
I know I kan make a loop through all links on the page, but it will be slow. Can the jquery be changed to look like:
$('a[target="_blank"]').removeAttr('target').OnlyWhenLinkContains("shop") ; :)