When you're using jQuery you don't need onclick events inline in your HTML. And one would assume that the Next Clue shouldn't be available until the First Clue is seen. So:
Code:
jQuery(function($){
$("#but").click(function(){
$("#clue1").load('clue1.txt');
$("#butt").click(function(){
$("#clue").load('clue.txt');
}).attr('disabled', false);
});
});
and:
Code:
<p id="clue1"> WANT CLUE CLICK HERE <button id="but"> GET CLUE </button></p>
<br />
<br />
<p id="clue">NEXT CLUE <button id="butt" disabled> NEXT CLUE</button> </p>
But, if you just want it the way it was, but working on a single click for each:
Code:
jQuery(function($){
$("#but").click(function(){
$("#clue1").load('clue1.txt');
});
$("#butt").click(function(){
$("#clue").load('clue.txt');
});
});
and the HTML part, without the disabled:
Code:
<p id="clue1"> WANT CLUE CLICK HERE <button id="but"> GET CLUE </button></p>
<br />
<br />
<p id="clue">NEXT CLUE <button id="butt"> NEXT CLUE</button> </p>
Bookmarks