below is my simple code to change the background image of header tag but it is not working at the moment
$(window).scroll(function() {
if ($(this).scrollTop() > 400) {
$("header").css("background", "url(http://www.kreativestudio.ca/wp-content/themes/parasponsive/images/header_bg2.png) repeat-x scroll 0px rgba(0, 0, 0, 0) !important");
}
else {
console.log('there');
$("header").css("background", "url(http://www.kreativestudio.ca/wp-content/themes/parasponsive/images/header_bg.png) repeat-x scroll 0px rgba(0, 0, 0, 0) !important");
}
});
whats the matter in this code?