...

View Full Version : Resolved JQuery help



BarrMan
09-07-2009, 04:15 AM
Hey,

I started using JQuery today and I'm trying to replace some codes with it since it doesn't recognize the document.getElementsByTagName anymore.

I have a problem with the function $. I'm using a function which gets a parameter of an unknown object like this:

function myfunction(obj)

Then I would like to get all the img tags inside this object. What I would have done is:

function myfunction(obj)
{
var imgs = obj.document.getElementsByTagName('img');
}

But I can't seem to find the solution using jquery.

Can anyone help me with this?

Thanks.

BarrMan
09-07-2009, 04:30 AM
OK, I found what the answer is.

function myfunction(obj)
{
var imgs = obj.find('img');
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum