How to make multiple events from a onclick in a HTML and javascript button?

  • Thread starter Thread starter Verefor
  • Start date Start date
V

Verefor

Guest
i am very new to HTML and javascript, but on my website i am using this code to make a button which toggles whether to show or hide paragraphs

<input type="button" class="button" onclick="return toggleMe('para1');return toggleMe('para2')" value="Button 1">

i need it to toggle both para1 and para2 simultaneously, but only the first is toggled,
how can i alter this code to perform both tasks on one click of the button?
 
Back
Top