jquery
テーブルセレクターについて質問があります
私のhtml
<table>
stuff...
</table>
<table class='table'>
stuff...
</table>
テーブルクラスのないテーブルで何かしたいです。
if($('table').hasClass('table')){
return;
}
..do something with table that has no 'table' class
ただし、テーブルの 1 つに ' table
' クラスがあるため、コードは常に返されるようです。
最初のテーブルに 2 番目のクラスまたは ID を追加できません。これを行う方法はありますか?どうもありがとう!