Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jquery effect not working Reply To: jquery effect not working

#150925
whatsoever
Participant

IDs are supposed to be unique. To make your code work, just use something like this.

$(document).ready(function(){
  $("button").click(function(evt){
    $('p', evt.target.parentNode).toggle();
  });
});