[ACCEPTED]-Convert something to Jquery object-jquery
Accepted answer
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.
$(item).attr("whatever")
Jquery takes many different types of arguments, including 1 straight up HTML elements, read the doco
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.