I'm doing some testing and I came across one this very annoying error.
It's easy to explain: I want JQuery to give alert
to all <a>
of the page, but it only alert
once and nothing else. Let's go to the codes:
<ul>
<li> <a href='http://www.google.com.br' class='tooltip'> Não clique </a></li>
<li> <a href='http://www.youtube.com.br' class='tooltip'> Não clique </a></li>
<li> <a href='http://www.redtube.com.br' class='tooltip'> Não clique </a></li>
</ul>
So I did JQuery, which is simple:
<script>
/*$(document).ready(function(e) {
var href = $('.tooltip').attr('href');
alert(href);
});*/
$(window).scroll(function(){
var href = $('.tooltip').attr('href');
alert(href);
})
</script>