javascript - How to Load an object to a jQuery object -


In my JavaScript, I have a function that will return an element in the HTML page. I have given it a variable And now want to transcribe some kind of things, including the use of jquery methods like parent / fadein / fadeaut etc.

How can I do this? My current code gives the object

  var currentObject = GetThatObject ();   

Now I really want to play with this object as we do with a typical jQuery object which we

  var curObj = $ ( "#" TatElement ")    

You do this:

 Var curObj = $ (current object);   

jQuery can not only pick selector strings, but HTML elements also take as arguments, it will only take that element , Wrap it in your jQuery object and then you use it the same way You can use it as if you used a selector string (it is actually a bit more efficient because jQuery does not need to parse the selector and find the element.)

Comments