Dynamically changing image colours

前端 未结 3 1509
别跟我提以往
别跟我提以往 2021-01-06 00:04

I am developing an application which displays multiple views as tables (for example customers, products, etc.). The last column of each row contains buttons, using which the

3条回答
  •  天命终不由人
    2021-01-06 00:49

    I've implemented a very similar feature on one site I've built. We allow users to select from different layouts (similar to your html) as well multiple palettes of colors, images, etc. You definitely do this with jquery:

    On init of the page you can do

    $("head").append("");
    

    On some sort of change event (or reload of data). My data is loaded via ajax

    css = $("head").children(":last");  // or find your  that you'd replace
       css.attr({
       rel:  "stylesheet",
       type: "text/css",
       href: path_to_your_css
    });
    

    You can change anything you want that way including colors and images.

提交回复
热议问题