[ACCEPTED]-Convert something to Jquery object-jquery

Accepted answer
Score: 25

You can just wrap it like this:

var jQueryItem = $(item);

where item is 5 a DOM element. In fact, you'll find yourself 4 doing this a lot in callback functions, since 3 usually this refers to a DOM element and you'll 2 usually want to operate on that using jQuery 1 API calls.

Score: 13

$(item).attr('disabled', 'true'); should work

See: http://docs.jquery.com/Core/jQuery#elements

0

Score: 0
$(item).attr("whatever")

Jquery takes many different types of arguments, including 1 straight up HTML elements, read the doco

More Related questions