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 8488273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:29:07+00:00 2026-06-10T21:29:07+00:00

I am new to jquery . I have recently designed a website in which

  • 0

I am new to jquery. I have recently designed a website in which I need to implement a color selector.
and the customer demands that he need a color selector as used in the website http://www.dulux.in/color_pallette_start.jsp
please help me how can i design it using jquery

  • 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-06-10T21:29:09+00:00Added an answer on June 10, 2026 at 9:29 pm

    I can guide you with a simple theme selector, using jQuery. You have a few steps before you finish.

    1. First thing is, identify the themeable elements.
    2. Create separate styles for those elements alone.
    3. Use jQuery to switch classes.

    Part 1: The content.

    Lets have a sample content this way:

    <ul class="links">
        <li><a href="#">Link One</a></li>
        <li><a href="#">Link Two</a></li>
        <li><a href="#">Link Three</a></li>
    </ul>
    <div class="content">
    <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
        consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    </p>
    
    <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
        consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    </p>
    ​</div>
    <div class="clear">Copyright</div>
    

    Define the layout CSS for this:

    .links {float: left; width: 25%; margin: 0; padding: 0;}
    .links li a {display: block; padding: 5px; text-decoration: none;}
    .content {float: left; width: 75%;}
    .clear {clear: both; padding: 10px; text-align: center;}
    

    Part II: Theme CSS

    Say we have three themes. Light, Dark and Blue. The CSS for the same:

    .light {background: #fff;}
    .light .links li a {color: #09f;}
    .light .content p {color: #333;}
    
    .dark {background: #000;}
    .dark .links li a {color: #00f;}
    .dark .content p {color: #ccc;}
    
    .blue {background: #00f;}
    .blue .links li a {color: #f00;}
    .blue .content p {color: #0ff;}
    

    Part III: Now the JavaScript / jQuery switcher.

    We just need to add or remove the classes. Since we know the names of the themes, we will remove all the classes and add the correct class.

    $(document).ready(function(){
        $(".links li a").click(function(){
            var theme = $(this).attr("href");
            $("body").removeAttr("class").addClass(theme);
            return false;
        });
    });
    

    We have added this handler to the links. Now we need to update the links with the name of the themes.

    <ul class="links">
        <li><a href="dark">Dark Theme</a></li>
        <li><a href="light">Light Theme</a></li>
        <li><a href="blue">Blue Theme</a></li>
    </ul>
    

    Now upon clicking on the respective themes, the theme of the document gets changed.

    Fiddle: http://jsfiddle.net/QSZ3R/

    Hope you understood and it is easy! 🙂

    For a colour palette, you can think of using Color Picker – jQuery Plugin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have application that brings response via Ajax and creates 5-20 new jQuery click
I am very new to Mootools but have good experience in jQuery. Recently i
I'm quite new here, and just recently discovered jQuery. I have a list: <ul
recently i uploaded my application to production server, which have ajax jquery calling my
I have recently made a new homepage for my company so that employees can
i'm new to jquery .I have problem in the following code .I saved it
I'm new to jQuery and have noticed someone go: var $this = $(this); Why
I am new to jQuery and have run into a problem. I have a
I am somewhat new to jQuery and I have a problem with something I
hey people I'm new at jquery and i have been trying to figure this

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.