Currently I have a button which changes its text from Pause to Resume when clicking on it. I use jQuery and toggle for this:
$(document).ready(function() {
$("#pause").click(function() {
$("td").toggle();
$(this).html($(this).html() == "Pause" ? "Resume" : "Pause");
});
});
This all works. I also have 2 functions:
function pauseTimer()
function startTimer()
How do I "integrate" these two functions into my toggle code? So when I hit Pause it will toggle the text to Resume AND also use the function pauseTimer() and if I hit the button again, the text will change back to Pause and also use StartTimer()?
Thanks
ifcondition containing the two statements.