I am trying to change a background image of a html5 canvas from dropdown select by using following code
$('select').on('change', function() {
if (this.value ==1){
$('#canvas').css('background-image').fadeOut();
$('#canvas').css({'background': 'url(http://localhost/MapBox/img/cal_NAs.png) no-repeat top right, url(http://localhost/MapBox/img/bg_sh.png) no-repeat top right','background-color' : 'grey'}).fadeIn();
}
})
but this is not doing the job and I am getting this error on console : Uncaught TypeError: undefined is not a function. can you please let me know what I am doing wrong?