var links = $('a');
$(links).each(function(i, link){
console.log($(link).attr('href));
});
var $link = $('#idDoLink');
console.log($link.attr('href));
- Video relácionado: https://youtu.be/Znpbz6RzLFI
var links = $('a');
$(links).each(function(i, link){
console.log($(link).attr('href));
});
var $link = $('#idDoLink');
console.log($link.attr('href));