javascript - How to hide a few divs in turn? -


for example, have 200 divs on website:

<div>link</div> <div>link</div> ..... <div>link</div> 

i click links in each div in turn , hide , hide every clicked div. how this???

you have employ javascript. arguably popular approach use jquery corresponding code along lines of:

$("#link").click(function(){  $(this).parent("div").hide(); }) 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -