$('document').ready(function() { $('a').each(function() { if($(this).attr('href').length < 1){ $(this).remove(); } }); });