1 2 3 4 5 6 7 8 9 10 11 |
$(".timemachine").click(function() { var timemachinetype = ($(this).attr("name")); //get name of clicked class element $('.answerarea').val('Cool.. you got a '+timemachinetype+'!') // make value of textbox with class answerarea equal 'Cool ect' $('#q6hidden').val(timemachinetype); //transfer a javascript variable to textbox $('#userCaption').val('<?php echo $q7 ?>'); //transfer a php variable to a textbox $("#sixty").trigger("click"); //pretend that you have clicked element id 'sixty' (make sure its a button etc) $('.q6').hide("fast"); //hide div with class q6 $('.q7').slideDown("2000", "easeOutBounce"); //show div with class q7 (must call jquery ui) }); |
