Jump to content

On Click and unclick?


N1CK3RS0N

Recommended Posts

I'm working on a WYSIWYG editor. I'm not that great with JS at the moment.

 

I'm trying to make the buttons on the toolbar turn a color if they are enabled and then shut off when disabled.

 

For example. If you click bold to enable bold font weight, it will turn the background of the button darker while enabled. Then I want it to return to normal when clicked again to disable the bold font weight.

 

Using "this.style.background" in the function that handles the things onclick works, but I cannot get it to disable when u click again.

Link to comment
https://forums.phpfreaks.com/topic/205795-on-click-and-unclick/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.