Advertisement
Guest User

Untitled

a guest
Jul 14th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <div class="firstQuestion">
  2. <div class="male" onclick="secondQuestion(this);"></div>
  3. <div class="female" onclick="secondQuestion(this);"></div>
  4. </div>
  5.  
  6. <div class="secondQuestion">
  7. <form class="formAconselhamento" id="male">
  8. <input type="button" id="save_value_male" class="back" name="save_value" onclick="comeBack(this); return false;"/>
  9. <input type="button" id="save_value_male" class="next" name="save_value" />
  10. </form>
  11. </div>
  12.  
  13. function secondQuestion(divID)
  14. {
  15. var clicado = $("#"+$(divID).attr('class'));
  16. $(".firstQuestion").hide();
  17. $("#"+$(divID).attr('class')).show();
  18. }
  19.  
  20. function comeBack(divID)
  21. {
  22. var backButton = $(divID).attr('id');
  23.  
  24. if ( backButton == 'save_value_female' || backButton == 'save_value_male' )
  25. {
  26. $(".secondQuestion").hide();
  27. $(".firstQuestion").show();
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement