Reputation: 13
I am trying to loop through the elements link
and script
tag
$("script").each(function () {
alert("Test");
});
The code works for img
tag but does work for the above 2?
Upvotes: 1
Views: 909
Reputation: 163288
Try this:
$("script, link").each(function () {
alert($(this).attr('type')); //:)
});
Upvotes: 2