SHERIN AS SHERIN AS - 1 year ago 106
jQuery Question

how to show particular div using jquey

<div class="companyname" data-companyname="abc" ></div>
<div class="companyname" data-companyname="xyz" ></div>
<div class="companyname" data-companyname="pqr" ></div>

i need show only data-companyname="abc" div i used following way in jquery


how it is get?

Answer Source

.companyname {
  display: none
<script src=""></script>
<div class="companyname" data-companyname="abc">1</div>
<div class="companyname" data-companyname="xyz">2</div>
<div class="companyname" data-companyname="pqr">3</div>

use the attr selector

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download