Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4559438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:47:20+00:00 2026-05-21T17:47:20+00:00

I have a slide viewer I am making. I have all the css working

  • 0

I have a slide viewer I am making.

I have all the css working perfect, and the sprites working perfect.
Issue I have is, I have a Play and a Pause icon.

They are grey normal state, and pink on hover. But when they are clicked I want them to be pink.
The issue I have is this:

When page loads, the image slider auto plays, so I would like the PLAY button automatically PINK.
Then if user clicks PAUSE button I would like the PAUSE button made PINK, and the PLAY button GRAYED !

And then vice versa, for when user clicks PLAY, this button would turn PINK and pause button GRAYED

I am not sure how to do this as regular css I am sure cannot accomplish this on its own.

css:

div.play { width: 12px; height: 17px; background: url(../images/icons/slider-controls.png) no-repeat 0 -181px; }
div.pause { width: 18px; height: 16px; background: url(../images/icons/slider-controls.png) no-repeat 0 -121px; }
div.play:hover { width: 12px; height: 17px; background: url(../images/icons/slider-controls.png) no-repeat 0 -204px; }
div.pause:hover { width: 18px; height: 16px; background: url(../images/icons/slider-controls.png) no-repeat 0 -143px; }

html:

<a href="javascript:;"><div class="pause left" id="my-start-stop"></div></a>
                <a href="javascript:;"><div class="play left" id="my-stop-start"></div></a>

js: ( for the controls )

$('#my-start-stop').click(function() {
            slider.stopShow();
            return false;
        });
        $('#my-stop-start').click(function() {
            slider.startShow();
            return false;
        });

Image Sprite is:
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T17:47:21+00:00Added an answer on May 21, 2026 at 5:47 pm

    Oops, I read the div id names as the same… darn dyslexia LOL… Anyway, I changed the names and made a demo, code is below:

    HTML

    <a href="javascript:;"><div class="pause left" id="my-pause"></div></a>
    <a href="javascript:;"><div class="play playing left" id="my-play"></div></a>
    

    CSS

    div.play, div.pause {
        float: left;
        background: url(https://i.stack.imgur.com/lqK28.png) no-repeat;
    }
    div.play {
        width: 12px;
        height: 17px;
        background-position: 0 -181px;
    }
    div.pause {
        width: 18px;
        height: 16px;
        background-position: 0 -121px;
    }
    div.play.playing, div.play:hover {
        width: 12px;
        height: 17px;
        background-position: 0 -204px;
    }
    div.pause.paused, div.pause:hover {
        width: 18px;
        height: 16px;
        background-position: 0 -143px;
    }
    

    Script

    $('#my-pause').click(function() {
        $(this).toggleClass('paused');
        $('.play').removeClass('playing');
        slider.stopShow();
        return false;
    });
    $('#my-play').click(function() {
        $(this).toggleClass('playing');
        $('.pause').removeClass('paused');
        slider.startShow();
        return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a menu div that I want to slide down so it's always
I have a UIPickerView as subview in a UITableViewController, which I want to slide
Basically I would like to have a DIV slide out and do a slight
I have successfully created a UITableView/UITableViewCell that is able to slide up and down
I want to have the div #topmessage slide down on the users second visit
i have an exampe HERE im not sure how to make the div slide
I have a live wallpaper that uses vibrate permission. When the slide screen that
I have a side project I do = in Java. It's a pretty straight-forward
I have a 4 side convex Polygon defined by 4 points in 2D, and
I have some client side code that uploads an Outlook email to a document

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.