.children() method does not return jQuery object but Javascript object
- <script type="text/javascript" src="javascript/jquery.js"></script>
- <script>
- $(function(){
- var c = $('#parent').children();
- alert(c[0]); // [object HTMLDivElement] this return the Javascript Object and not jQuery Object
- alert(c[0].attr('id')); // Error : c[0].attr is not a function
-
- </script>
- <span id="parent">
- <div id="child">Child</div>
- </span>
Why the Children return Javascript object and not jQuery object ?
how to get jQuery object of those children ?
Thanks