Posts: 1
Registered: ‎01-18-2020

Styling the HTML inside of a leaflet popup based on values from json

I want to add some conditional formatting to my HTML inside of a leaflet map popup. The popups are all created before the page loads and are part of the map layers. I need to figure out a way to change the CSS styling for specific lines based on the data they are displaying that is coming from a database call.

I've attempted to do some jQuery logic like I've seen in examples, but they don't seem to work inside the popups.