How to change style dynamically in custom block for mobile development?

I have designed a custom block which has some input parameters and events.

The one input parameter is used for color for which I need to update the style of container used in it.

How It could be possible that color variable set outside the block.

Like when user use this block then the color should pass and the block should behave accordingly.


Do I need javascript for this to run at OnReady event or what I need to do this for achieving this feature.

If javascript need to use then what line should I write in it ( to change the font color of container block)


screen shot blow (This is not working. Can anyone solve it?)


Please help me regarding this.

Solution

Hello Manish, you can do this directly in extanded properties from your div or element. 

And then use the parameter to ser the color inline direct in property "Style" or you can use the property Class to set a class with the correct name. 


Best regards,


James

Solution

Hi Manish,

You don't need a javascript to do this. Just set the style of the container and assign color css property there.

James Andrade wrote:

Hello Manish, you can do this directly in extanded properties from your div or element. 

And then use the parameter to ser the color inline direct in property "Style" or you can use the property Class to set a class with the correct name. 


Best regards,


James


Thanks a lot