Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Live binding script tag content.

$
0
0
We were wrangling with using Mustache and other trickery to set up content for Bootstrap tooltips for ggrc-core, and came across a problem where we wanted to put some content inside of an <a> tag to be slurped into an attribute later (where Bootstrap-tooltip can find it), but the DOM content model was broken due to the <a> then containing a <div> but being inside of a <p>.  So I ended up writing up a Mustache helper that would wrap the content in a <script> tag while maintaining live binding on the context and its attributes.  Check it out:  https://gist.github.com/bmomberger-reciprocity/8483808

Viewing all articles
Browse latest Browse all 3491

Trending Articles