jQuery vs document.querySelectorAll

后端 未结 12 1071
闹比i
闹比i 2020-11-28 01:28

I heard several times that jQuery\'s strongest asset is the way it queries and manipulates elements in the DOM: you can use CSS queries to create complex queries that would

12条回答
  •  温柔的废话
    2020-11-28 01:37

    Just a comment on this, when using material design lite, jquery selector does not return the property for material design for some reason.

    For:

    This works:

    document.querySelector('#myinputfield').parentNode.MaterialTextfield.change();
    

    This does not:

    $('#myinputfield').parentNode.MaterialTextfield.change();
    

提交回复
热议问题