Popover: Remove title UI if not set
If I don't set a title, I don't want the title bar UI to be shown.
Perhaps a better solution would be to require the title option to be set to null or false or some other nonsense value.
If you don't want the title element - you can set that in template option. thanks!
What template option? Is that added in 2.0.1?
yes, what is the template options...
There is an undocumented option for popover() called template.
Example: $('#test').popover({ title: '', content: 'just content', trigger: 'focus', placement: 'top', template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>' });
This will show the popover -without- the title.
Too see the built-in template open bootstrap.js and search for 'POPOVER PLUGIN DEFINITION'. At line 1337 (in my version) you can see the default setting for the template option.
It seems like a simple check to see if the title option is empty that it should hide the title part of the template would be ideal rather than having to set the template every time.
I agree with OP. When would one want to have a title bar but no title text? Wouldn't it be safe to remove the header in those cases?
+1 for title-less popover support
+1 for title-less popover support
+1 for title-less popover support.