jQuery; how to .get out of external script
Posted: Tue Nov 02, 2010 6:38 pm
I have a page with anchors.
Now i know how to make an array of these using the '.get'-function of jQuery.
Only problem is that when i try to do it from my external script, it returns undefined.
This is what i got:
So using this in the root-document, no problem...
What am i messing up?
Please help!
Now i know how to make an array of these using the '.get'-function of jQuery.
Only problem is that when i try to do it from my external script, it returns undefined.
This is what i got:
Code: Select all
function makeImageArray() {
var imageArray = jQuery('a[rel^="alight"]').get(0);
alert(imageArray);
}
What am i messing up?
Please help!