samedi 25 juin 2016

How to make a dynamic popover location and content based on JS variables?


I have a pages with a 5x4 grid of analog clocks, each drawn from a canvas. These clocks are segmented into 48 sections (15mn each) and are white, unless there is a meeting during that segment in which case it is blue. This color is made from javascript context.fillStyle, not CSS. How can I grab a javascript class variable using JQuerie? I am thinking something like (where pieScript.js is the javascript file) : <button class="button2" data-toggle="popover" title="piescript.headerText" data-content="pieScript.data-contentText" data-placement="left"></button> What am I doing wrong here? I am new to these languages so bear with me.Thank you!

Aucun commentaire:

Enregistrer un commentaire