SpongeBob SquarePants: Battle for Bikini Bottom - Rehydrated
Category:SpongeBob SquarePants
Category:2010 video games
Category:Windows games
Category:Windows-only games
Category:Video games based on television series
Category:Video games developed in the United States
Category:Video games set in New York CityQ:
Add/Remove class using js generated by compiler
I'm using a js file I downloaded from a blog, and I would like to add and remove a class when some element is clicked. This file generates a java script code to bind the events to the elements in my page.
I can not figure out how to do it. Can someone help me?
Thanks
XXX
XXX
XXX
function remover_class(control)
{
var class = control.className;
alert(class);
}
A:
Since you have got the element with the class already,
in your function, just get the class like this:
var class = control.className;
alert(class);
instead of
var class = control.className;
alert(class);
this will give you the class itself.
Contest Closed. Winner(s) will be notified by e-mail. Winner(s) will have 7 days to respond to notification e-mail or we will draw an alternate winner.
Thank you all for entering this contest! We had a wonderful response. Be sure to stop by and check out our other contests. Good luck in all of them! be359ba680
Related links:
Comments