I understand that it is possible to use a variable as the css property to be applied by jQuery (using .css('property',variable)
) but for some reason the variable that is successfully got is not being put into the css.
Here is the JQuery code that I have:
$('#color-scheme').change(function(){
var colorScheme = $('#color-scheme').val();
$('.wppw-title-font-color').css('color','');
$('.wppw-background-color').css('background-color','');
$('.wppw-title-font-color').css('color',colorScheme);
$('.wppw-background-color').css('background-color',colorScheme);
console.log(colorScheme);
});
A demo of the project I am currently doing can be found here: http://codepen.io/zephyr/pen/ipsHu
I want the user to be able to change the styles of my fancybox via the menu that I have created. (I'd only want to be using JQuery to do this open to suggestions on changes that I can do on the menu as well to more easily get the desired result.)
Thanks!
Thanks for the replies, turns out I was a dunce and didn't remove the !important on the css properties, my bad!