Mashiane Expert Licensed User Longtime User Aug 28, 2020 #1 Ola Whilst we have RemoveAttr and RemoveClass, we dont have a defined RemoveStyle? Is it right to assume that you remove it one justs B4X: .BANanoElemnt.SetStyle( BANano.ToJSON(CreateMap("background-color":"")) Thanks.
Ola Whilst we have RemoveAttr and RemoveClass, we dont have a defined RemoveStyle? Is it right to assume that you remove it one justs B4X: .BANanoElemnt.SetStyle( BANano.ToJSON(CreateMap("background-color":"")) Thanks.
alwaysbusy Expert Licensed User Longtime User Aug 28, 2020 #2 No, RemoveStyle is not a thing in JavaScript. You will have to access the style property I would guess. Note that doing this is not commenly done. One would use style classes for that and just swap/add/remove them. Something like this could work: (Untested) B4X: mElement.GetField("style").RunMethod("removeProperty", Array("background-color")) Upvote 0
No, RemoveStyle is not a thing in JavaScript. You will have to access the style property I would guess. Note that doing this is not commenly done. One would use style classes for that and just swap/add/remove them. Something like this could work: (Untested) B4X: mElement.GetField("style").RunMethod("removeProperty", Array("background-color"))