Results 1 to 2 of 2

Thread: change element css class with js/jquery

  1. #1
    Join Date
    Sep 2006

    change element css class with js/jquery

    please see URL http://backstageweb.net and attached .gifs.

    What I want to do here is swap the div class from '.audience_off' to '.audience_on' when the "play" button is clicked ("I set the stage and...[play button]")

    I found this reference, which I'm sure contains the answer I'm looking for, except I still don't know precisely how to code it:


    I think this is the basis of the code I'm looking for:
    <script type="text/javascript">
        function changeClass()
            // code examples from above
    <button onclick="changeClass()">My Button</button>
    I should note my (onclick) button has a class of its own too:

    <a class="switch" href="#"></a>
    Thanks for any help.

    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2012
    I do not know the answer to your query, but I have optimised the color depth of your two GIFs...
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center