Use jQuery on a variable instead on the DOM ?
Posted
by Stef
on Stack Overflow
See other posts from Stack Overflow
or by Stef
Published on 2010-05-07T06:56:34Z
Indexed on
2010/05/07
6:58 UTC
Read the original article
Hit count: 162
In jQuery you can do :
$("a[href$='.img']").each(function(index) {
alert($(this).attr('href'));
}
I want to write a jQuery function which crawls x-levels from a website and collects all hrefs to gif images.
So when I use the the get function to retrieve another page,
$.get(href, function(data) {
});
I want to be able to do something like
data.$("a[href$='.img']").each(function(index) {
});
Is this possible ?
© Stack Overflow or respective owner