KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Like, I want to check if a link has a certain domain, or already has parameters attached to the end. is there a way of doing a regex thing like ~= maybe? currently, I have alert(ref); $j("a[href*='mysite']").each(function(i){ alert("hello"); $j(this).attr('href',$j(this).attr('href') + "?ref=" + $j.cookie.get("tb_ref")); }); but the selector isn't working. (I never see the Hello alert, but I seed the alert ref alert. my a tags <a href="http://domain.mysite.com/">yeah, link</a> <a href="http://google.com/">g, link</a>
Tags (comma-separated)
Save Edits
Cancel