Monday, 12 August 2013

jQuery and css()

jQuery and css()

Here is a piece of code from FancyBox ...
JQUERY
// Set custom style, close if clicked, change title type and overlay color
$(".mainmenu").fancybox({
wrapCSS: 'fancybox-custom',
closeClick: false,
topRatio: 0,
scrolling: 'no',
fitToView: 'false',
helpers: {
title: {
type: 'inside'
},
overlay: {
css: {
'background': 'url(img/misc/fancybox_overlay.png)'
}
}
}
});
and additionally, I would like to add the following line to it, but
somwhow it doesn't seem to work - getting tons of syntax errors here.
JQUERY
$(".blabla").css({"background-color":"yellow"});
Would be great if anyone could help.

No comments:

Post a Comment