Monday, February 27, 2012

jquery hide element without id

It is easy to hide something by jquery

${"#elementId"}.hide()


But sometimes the element you want to hide may not have id, let say the html is like this



<div id=”div1”>

<table>

<thead>…</thead>

<tr…

</table>

</div>



we can hide the thead by this



${"#div1 table thead"}.hide()

No comments:

Post a Comment