html - Javascript code to change the div style -


here div:

 <div class= "kjx" >       // div content  </div> 

after clicking on div, want change div style this:

   <style>         background-color: red;        font-type: oswald;    </style> 

i want change stay on div after clicking, not during clicking. there script that?

i think should be:

$(function() {               $('.home').click(function() {                     $(this).css({'background-color', 'red'});               });         }): 

Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -