• Welcome to Simple Machines Community Forum. Please login or sign up.
January 26, 2022, 07:27:16 PM

News:

SMF 2.0.19 has been released! Please update. Read more.


How to style Javascript buttons?

Started by Doctor Asp, November 16, 2021, 07:13:52 AM

Previous topic - Next topic

Doctor Asp

You cannot see attachments on this board.
I need to add class="MyButton" to the two unstyled buttons "Delete" and "Insert" in the screendump.
The buttons are created in Javascript and I can´t find a way to style them.
/Doctor Asp

Doctor Asp

Quote from: Doctor Asp on November 16, 2021, 07:13:52 AMYou cannot see attachments on this board.
I need to add class="MyButton" to the two unstyled buttons "Delete" and "Insert" in the screendump.
The buttons are created in Javascript and I can´t find a way to style them.

After some Sherlock Holmes investigation, I found a file named "smf_fileUpload.js" (It´s not easy to search for the word "button"...). In that file I found the two js functions that creates the buttons - with a parameter named addClass. After changing the classname to MyClass it worked! I even managed to change the order of the buttons. Mission accomplished. ;-)
You cannot see attachments on this board.
/Doctor Asp

Advertisement: