var className = $('#sidebar div:eq(14)').attr('class');. should do the trick. For the ID use .attr('id') . ... <看更多>
Search
Search
var className = $('#sidebar div:eq(14)').attr('class');. should do the trick. For the ID use .attr('id') . ... <看更多>
See: http://toddmotto.com/creating-jquery-style-functions-in-javascript-hasclass-addclass-removeclass-toggleclass/. */. function hasClass(elem, className) {. ... <看更多>
className. Specifies additional classNames to add to the menu element. Seperate multiple classes by using spaces. className : string ... ... <看更多>
If you want to use jquery (or any 3rd party JS library), it is better to pass the native lightning selector to jquery - without which there ... ... <看更多>