Grow your CSS skills. Land your dream job.

css style picker ?

  • # February 21, 2013 at 12:25 pm

    hello everyone

    can you tell me how could I code a script or any other way that let the visitor choose his css style

    for example if he click a blue button the whole page will use a css that specify the blue color for elements etc.

    # February 21, 2013 at 12:28 pm

    There are quite a few…

    Try googling jQuery CSS Switcher

    # February 21, 2013 at 1:10 pm

    You can make your own easily enough. All you need to do is attach an `id` to the link element and switch the `href` to which it links to the location of a different file.In terms of getting the values to switch it to, you could create a `select` tag with the value for each `option` defined as a different page. An example of this form could be:

    `




    `

    Then you can latch onto what has been selected:

    $(‘#style-selector”).on(‘change’, function() {
    $(‘link’).attr(‘href’, $(“style-selector”).val() );
    });

    Nice clean solution that you can expand as needed without having a bunch of features you may not need!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".