Skip to content
Advertisement

Tag: repeat

Making flexible piece of text for a couple of objects

I have 2 objects, vehicle1 and vehicle2 objects, for vehicle1 I have a leaflet popup: I’d like to do the same with vehicle2, just to swap between objects, so I want something like that: But I don’t want to repeat code like this. I tried putting it into the object with ‘this’ keyword, but it didn’t work. Thanks for help!

Advertisement