Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
64
rated 0 times [  67] [ 3]  / answers: 1 / hits: 55892  / 12 Years ago, wed, october 3, 2012, 12:00:00

I need to get all the links in the page using .each(function(){}); in JQuery



<div id=mm>
<ul class=mg>
<li id=nav_sports>
<a href=http://www.google.com class=atest>Sports</a>
<div id=sports>
<ul>
<li>
<a href=http://www.dictionay.com>cricket</a>
</li>
</ul>
<ul id=cont1>
<li style=color:#444444>
<b>Popular</b>
</li>
</ul>
</div>
</li>
</ul>
</div>

More From » jquery

 Answers
47

this is what i expected guys...thanks for ur replies



$(a).attr(clink,);
$(window).load(function(){
$(#mm a).attr(clink,);
$('#mm a').each(function(){
var hrefl=$(this).attr('href');
var clink=hrefl;
$(this).attr('clink',clink);
$(this).attr('href',#);
});
});

[#82779] Tuesday, October 2, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
yesseniadajab

Total Points: 258
Total Questions: 101
Total Answers: 127

Location: Mexico
Member since Mon, Sep 12, 2022
2 Years ago
;