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>

Also, one more bit of code that might be helpful... here's the JS where I'm initializing the play/pause function in the code before the toggle:

$('.pauseButton').click(function() {
    $slideshow.pause();
});

// attach resume functionality to resume button
$('.resumeButton').click(function() {
    $slideshow.resume(true);
});
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.