I have a plugin which shows posts from a certain city:
<div id='banner-root' style="height: 50px; width: 385px;"></div>
<script src="http://lujanventas.com/plugins/banner.js" type="text/javascript"></script>
I need to pass the cityID to the external javascript. I’m already getting height and width on the external .js by simply checking the banner-root element.
How do I pass the and ID? Also it would be nice if it was clear that you are passing the cityID
You don’t really pass the width and height to the script according to your comments.. you can use the same style with cityId like so:
You can then retrieve it with