Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript changing css property with javascript Re: changing css property with javascript

#93966

just update the jquery code…


// put the id or class you wanted to target
$(".box1, .box2").click(function () {

// just copy the id or classes in here
$(".box1, .box2").toggleClass("highlight");
});

here some resources btw…so you can get to know more about jquery , just in case

http://jquery.com/
http://docs.jquery.com/Main_Page

http://api.jquery.com/category/manipulation/class-attribute/

– i dont know what are you trying to achieve on this website of yours, can you tell?