jquery - Change css class in JavaScript - not the element assigned to it -


in js, want change background-image of class without changing element assigned class itself.

is there anyway it? or can changes made specific elements, , i'll have define class each background-image?

thanks!

you can try jquery :

$('.class-name').css('background-image','img-url'); 

if wanna change multiple properties, use :

$('.class-name').css({'prop1':'val1','prop2':'val2',.....,'propn':'valn'}); 

you can id's , tags names