You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

How to use jQuery object as container rather than specifying id? Created Mar 5, 2010

This thread is solved

Views: 798     Replies: 1     Last reply Mar 8, 2010  
You must login first before you can use this feature

icfantv

Posts: 2

Registered:
Mar 5, 2010

How to use jQuery object as container rather than specifying id?

Posted: Mar 5, 2010

I'd like to be able to pass in a jQuery object instead of an id but looking at the source code, it attempts to do an <obj>.innerHTML which you cannot do with a jQuery object.

I can easily modify the code to support what I want but wanted to see if anyone had any ideas on how to accomplish this without doing so.

Resig says that when you find yourself using ids everywhere consider using class selectors instead so what would be REALLY nice is if the code allowed the user to specify a selector as a string and then used jQuery to find it.

Thanks,

--adam

icfantv

Posts: 2

Registered:
Mar 5, 2010

» How to use jQuery object as container rather than specifying id?

Posted: Mar 8, 2010

Reply to: How to use jQuery object as container rather than specifying id?, from icfantv
I've edited the flashembed J/S library to accept either a jQuery object or a jQuery selector (as a string), in addition to a DOM id and it works swimmingly.

It appears that using jQuery to construct an <object> element (and all its child params) causes flashembed to not work in IE so I didn't convert that. I suspect there's a minimum number of attributes/child elements necessary to get it working so as to be able to use jQuery to create the DOM elements, but I didn't investigate this.

If anyone is interested in the source or diff, please let me know.

--adam