Monday, May 21, 2012

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>
Use:
<a id="mypopover" href="#" > Label </a>
__END__

No comments:

Post a Comment