I'm trying to code a play/pause button via Jquery and the Cycle plugin. I'm able to toggle between the two and the "resume" function works, but am not sure how to make the "pause" function work. Any ideas?
Thanks in advance for your time!
Here's my JS:
<script type="text/javascript">
$(document).ready(function() {
$('#toggle').bind("click", function() {
if ($(this).attr("class") == "pauseButton")
$(this).attr("class", "resumeButton");
else
$(this).attr("class", "pauseButton");
});
});
</script>
Here's my HTML:
<div id="toggle" class="resumeButton"></div>