Below given is relation between JQuery object and DOM element (i.e. Javascript object), Using this you can convert JQuery object into javascript object and apply formulas of javascript on it.
Consider Below Div
<div id="foo"></div>
Now below 3 alert will give same Javascript object (On which javascipt function can be performed)
alert($("#divTest")[0]); //Jquery
alert($("#divTest").get(0)); //Jquery
alert(document.getElementById("divTest")); //Javascript
Consider Below Div
<div id="foo"></div>
Now below 3 alert will give same Javascript object (On which javascipt function can be performed)
alert($("#divTest")[0]); //Jquery
alert($("#divTest").get(0)); //Jquery
alert(document.getElementById("divTest")); //Javascript
No comments:
Post a Comment