JQuery methods and DOM properties

后端 未结 4 895
梦如初夏
梦如初夏 2021-01-31 12:06

I am confused as to when I can use the DOM properties and when I could use the Jquery methods on a Jquery object. Say, I use a selector

var $elemSel = $(\'#myDi         


        
4条回答
  •  我在风中等你
    2021-01-31 12:38

    In order to call native DOM method you can use get(index). Or if you want to use jQuery Object method, you should wrap a native DOM element with jQuery, which will convert the DOM element into a jQuery Object, so all the methods will be available. http://www.linxinshan.com/?p=339

提交回复
热议问题