I am new to Javascript although i have completed a jQuery, html and css course on Codecademy so i should cope with what most of you should reply. for an assignment i wish to create a text based game that i have been developing using Buttons with paragraphs above them to explain what the character is about to do and the buttons is of a three way decision. I have set classes to different sets of questions, i have used the .hide() command and .show() command to bring up the next question, when it comes to my second question they all do different things and i would like bring a certain text up based on their decision. The problem is I have set all the separate questions under there own Div's so when you click the text within the <p> tags it still moves onto a different answer, if i dont set a <div> around the elements, they do not disappear and show the next set of questions, they just all go away immediately. also when i click on a button to make a decision it will go to a different set of questions because the whole <div> is set to go to the next set of questions but i wish to make the decisions alter the next group of questions. If this doesnt make sense to you now, i am going to implement my HTML and jQuery once i am able to access it from School. hope you guys get around to what i am doing and provide me with a solution. If you believe Javascript is a much better option i will try my best into finding a way to understand what you send me by learning from Codecademy or other websites available.
I might aswell try and re implement some of it here
<script>
$(document).ready(function(){
$(".2").hide();
});
$(document).ready(function(){
$(".1").click(function(){
$(".1").hide();
$(".2").show();
});
});
</script>
<p>You have arrived at a town</p>
(my form=button code goes below) with three buttons saying something different
this is a basic representation of what i have developed so far, when i click on the button, it wont show the next set of questions unless i have a <div> tag in-between my <p> and <form> tags, and if i use that method it will only take me to another set of questions, not based on the decision i made...