html - Hide all other div's using jQuery -
when click button, show div id. want hide other div id's. can point me tutorial on how using jquery
? current code given below:
$('#show_link_group').click(function() { $('#link_group').show(); });
after shows #link_group
, want hide other div's.
i suggest giving off div's class name , use hide them.
<div class="alert" id="item-one"></div> <div class="alert" id="item-two"></div> <div class="alert" id="item-three"></div>
then using jquery
// hide divs class of alert show div id of item-one $('.alert').hide().filter('#item-one').show();
Comments
Post a Comment