bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Popover: Remove title UI if not set

Open quasipickle opened this issue 14 years ago • 10 comments

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.

quasipickle avatar Feb 10 '12 17:02 quasipickle

If you don't want the title element - you can set that in template option. thanks!

fat avatar Feb 12 '12 19:02 fat

What template option? Is that added in 2.0.1?

quasipickle avatar Feb 16 '12 18:02 quasipickle

yes, what is the template options...

nodrog avatar Mar 07 '12 17:03 nodrog

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.

suneg avatar Aug 26 '12 21:08 suneg

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.

bjohnson045 avatar Sep 15 '12 21:09 bjohnson045

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?

ripperdoc avatar Oct 08 '12 04:10 ripperdoc

+1 for title-less popover support

anush avatar Nov 07 '12 14:11 anush

+1 for title-less popover support

mlaccetti avatar Dec 23 '12 21:12 mlaccetti

+1 for title-less popover support.

smattoo avatar May 29 '14 12:05 smattoo