Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="firstQuestion">
- <div class="male" onclick="secondQuestion(this);"></div>
- <div class="female" onclick="secondQuestion(this);"></div>
- </div>
- <div class="secondQuestion">
- <form class="formAconselhamento" id="male">
- <input type="button" id="save_value_male" class="back" name="save_value" onclick="comeBack(this); return false;"/>
- <input type="button" id="save_value_male" class="next" name="save_value" />
- </form>
- </div>
- function secondQuestion(divID)
- {
- var clicado = $("#"+$(divID).attr('class'));
- $(".firstQuestion").hide();
- $("#"+$(divID).attr('class')).show();
- }
- function comeBack(divID)
- {
- var backButton = $(divID).attr('id');
- if ( backButton == 'save_value_female' || backButton == 'save_value_male' )
- {
- $(".secondQuestion").hide();
- $(".firstQuestion").show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement