jquery objects are not the same as DOM objects
Example:
<id= "OOC"></p>
Normal processing, handled by standard javascript:
<script>var p = document.getElementById (' Ooc '); // get the element with ID OOC in the P tag, add a word to the text node, make the color red p.innerhtml = ' Learn jquery knowledge '= ' red '; </script>
The processing of jquery:
<script>var $p = $ (' #ooc '); $p. html (' Learning jquery Knowledge '). CSS (' Color ', ' red '); </script>
How do I turn a jquery object into a DOM object ?
html code
< Div > Element One </div><Div> element two </ div><Div> elements three </Div >
JavaScript code
<script>var//jquery object var// Convert to DOM object // Manipulating the properties of Dom objects </script>
The Get () method that comes with jquery
<script>var//jquery object var// via Get method, convert to DOM object // manipulating the properties of Dom objects </script>
Calling jquery after a normal DOM object is processed into a jquery object through the $ (DOM) method
JavaScript code <script>var//DOM Object var//jquery Object var// Find First DIV element // set color for first element </script>
jquery Objects and Dom objects