jQuery; how to .get out of external script

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
marcelcolt
Forum Newbie
Posts: 22
Joined: Tue Mar 02, 2010 5:56 am

jQuery; how to .get out of external script

Post by marcelcolt »

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:

Code: Select all

function makeImageArray() {
var imageArray = jQuery('a[rel^="alight"]').get(0);
alert(imageArray);
}
So using this in the root-document, no problem...
What am i messing up?

Please help!
Post Reply