Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Problem after update...

Good Day Nick, i have just updated Fresco from version 1.4 to 2.05

In my script using version 1.4 I wrote this to change the overlay background color:

function opnFresco() {
$(".fr-overlay-background").css("background", "red");

Since the update to 2.05 the script doesn't work. Any hint? U tried various times to fix but with no success. Thanks.


  • You shouldn't change layout with javascript, add css that overwrites what's defined in fresco.css instead. To overwrite the default "fresco" skin use:
    .fr-overlay-skin-fresco .fr-overlay-background {
    background: red;
    It's best to do this in a separate file so you can leave fresco.css as is and update it later.
  • Thanks Nick, I can't just change the CSS since in need to change color according to the image that I load and for every page there's a different image... With version 1.4 the script was working perfectly...
  • edited August 2015
    In Fresco 2, the overlay is only available in the DOM when Fresco is visible. That's why using javascript doesn't work, the overlay just isn't there when you're trying to change it.

    You can inline a style tag with the code I posted above and replace the color with something generated by your backend.
    <style type='text/css'>
    .fr-overlay-skin-fresco .fr-overlay-background {
    background: <?=$background_color?>;
Sign In or Register to comment.