I am trying to chance background image of a divison from a button without using function.
<input onclick="jQuery('#Div1').hide();jQuery('#Div2').show(); jQuery('#main').css("background-image", "url('../../Content/images/clear.png')");" type="button" class="t-button" style="width: 250px" value="Text" /><br />
Hide and show works well, but when I added change the background image it did not work. I have several buttons on the same page, and would like to change images accord to each button.
Thanks in advance
using Css and javascript its possible with simple way.Use and try below code …does it help ?
CSS