jquery - Applying run and stop button -
how achieve following:
when click
run button
, should hide , showstop button
.upon clicking
run button
, execute coded statements, still being able clickprevious
,next button
whilestop button
still being shownwhen click
stop button
, should hide , showrun button
.it should exit or stop statement intended run
run button
this thought of @ first, how can right (algo|pseudocode|simple presentation code)
$('#run').click(function e(){ //hide #run //show #stop //execute statements x //prev , next button must still clickable here $('#stop').click(function e(){ //hide #stop //show #run //go outside run stop execute statements x }); });
this handle button behaviours you've described. business of stopping statement depend on they're doing , how. more information required answer that.
$('#run').on('click', function(){ $('#run').hide(); $('#stop, #previous, #next').show(); executestatements(); }); $('#stop').on('click', function(){ $('#run').show(); $('#stop, #previous, #next').hide(); // // stopexecutingstatements(); // });
Comments
Post a Comment