JavaScript DOM object to jQuery object

后端 未结 2 1177
半阙折子戏
半阙折子戏 2021-02-01 01:19

How can I convert a JavaScript DOM object to a jQuery object?



function changeStatus(myObject) {
       XXX.removeClass         


        
2条回答
  •  后悔当初
    2021-02-01 01:48

    Simply wrap the pass the DOM object in as the first argument.

    $(myObject).removeClass('foo');
    

提交回复
热议问题