You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

On Button click change it's color

edited Dec 26, 2018 10:44AM in Visual Builder 1 comment

Summary

On Button click change it's color

Content

Hi,

VBCS version: 18.4.1

I am building mobile app which will be used to record inspection results.

There's button "No Defects"..

When user clicks on button, color of button should flip to Green.

I tried using app.css and setting background color of button. It did not work.

Also tried using JS code to set the background color of button. Even this did not work.

Any suggestions to achieve this will be appreciated

Thanks

 

 

 

Version

18.4.1

Code Snippet

JS code
       var property = document.getElementById("oj-button--354632918-2");
        property.style.background = "red" ;
        property.style.backgroundcolor = "red" ;

app.css
#oj-button--354632918-2:hover { 
  background-color:yellow;
  }
Only hover works. 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!