How to assign custom property to jQuery object?

Nathan Osman picture Nathan Osman · Apr 23, 2010 · Viewed 9.9k times · Source

I need to assign a custom property to a jQuery object. Here is the object:

var object = $("<div id='item'></div>");

I need object to have a custom data member. How can I add this?

Answer

Matt picture Matt · Apr 23, 2010