How can i add a new class to div in onclick function
This could be an option for adding by using jQuery, this way could only be used if you are loading jQuery library into the page.
jQuery('#mydivid').click(function(){ jQuery(this).addClass("newClass"); });
Please, sign in to be able to submit a new answer.