let arr = [];
arr.push(1);
arr.push(2);
arr.slice(arr.indexOf(1)); // remove element 1 (index 0)
- search any with some class
let q1 = $('.someclass');
- search any specific descendant with class that have parent with some class
<table class="sometblclass">
<tbody>
<tr>
<td class="j-mycls"></td>
</tr>
</tbody>
</table>
let q1 = $(".sometblclass > tbody > tr > td.j-mycls");
let q = $(".class1,.class2");
- search any element with attribute
<button mynfo="xx"></button>
$("button[mynfo]").each((idx,btn) => {
let mynfo = $(btn).attr("mynfo");
});
let q = $("[class^='starttext']");
- search class1 but not class2
let q = $(".class1").not(".class2");