Bootstrap popover with function driven content

In another post, I wrote about a technique that allowed loading content into a popover using a function.

Its a great feature but I found one gotcha. If you set anything in the data-content attribute on the trigger element, the content will not be loaded with the function.

Maybe I should say that again for myself, If you want to use content: function() {...} your element must not include data-content

Don't use:
<a id="mypopover" href="#" 
   data-content="will not run function"> Label </a>
<a id="mypopover" href="#" > Label </a>


Popular posts from this blog

Changing Dancer::Plugin::Ajax's content type

BootstrapX clickover

Template Toolkit Debugging inside of Perl Dancer