Bootstrap popover is not working

From the Docs on Popovers: Opt-in functionality: For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself. So you must call .popover() manually in JavaScript like this: $(“[data-toggle=popover]”).popover(); Or you can use whatever selector you want Here’s an example using StackSnippets. $(“[data-toggle=popover]”).popover(); body { padding: 50px; } <link href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css” … Read more

How do I adjust my popover to the size of the content in my tableview in swift?

In your UITableViewController’s viewDidLoad() you can add an observer: self.tableView.addObserver(self, forKeyPath: “contentSize”, options: .new, context: nil) Then add this method: override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { self.preferredContentSize = tableView.contentSize } Lastly, in viewDidDisappear(), make sure you remove the observer: tableView.removeObserver(self, forKeyPath: “contentSize”) This way the popover … Read more

How to change the size of a popover

Set the preferred content size on the view controller being presented not the popoverPresentationController override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) // func for popover { if segue.identifier == “popoverView” { let vc = segue.destinationViewController vc.preferredContentSize = CGSize(width: 200, height: 300) let controller = vc.popoverPresentationController controller?.delegate = self //you could set the following in your storyboard … Read more

Changing the width of twitter bootstrap popover

You can change the popover’s dimensions with CSS: .popover{ width:200px; height:250px; } But that CSS will change ALL popovers. What you need to do is put the button in a container element and use CSS like this: #containerElem .popover { width:200px; height:250px; max-width:none; // Required for popovers wider than 276px (Bootstrap’s max-width for popovers) } … Read more

How do I use popover from Twitter Bootstrap to display an image?

Very simple 🙂 <a href=”#” id=”blob” class=”btn large primary” rel=”popover”>hover for popover</a> var img = ‘<img src=”https://si0.twimg.com/a/1339639284/images/three_circles/twitter-bird-white-on-blue.png” />’; $(“#blob”).popover({ title: ‘Look! A bird!’, content: img, html:true }); http://jsfiddle.net/weuWk/

Warning: Attempt to present ModalTableViewController on MainTableViewController which is already presenting (null)

I had this issue because I was trying to perform segue / present from within: – (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex I changed it to: – (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex and it fixed it!

Apply CSS to popover in Bootstrap

The reason appears to be that the javascript is creating brand new elements to display the popover itself. These new elements have different css class names than the original. Try adding this to your css: .popover-title { color: blue; font-size: 15px; } .popover-content { color: red; font-size: 10px; } Update Depending on the library version … Read more

How can I hold Twitter Bootstrap Popover open until my mouse moves into it?

With bootstrap (tested with version 2) I figured out the following code: $(“a[rel=popover]”) .popover({ offset: 10, trigger: ‘manual’, animate: false, html: true, placement: ‘left’, template: ‘<div class=”popover” onmouseover=”$(this).mouseleave(function() {$(this).hide(); });”><div class=”arrow”></div><div class=”popover-inner”><h3 class=”popover-title”></h3><div class=”popover-content”><p></p></div></div></div>’ }).click(function(e) { e.preventDefault() ; }).mouseenter(function(e) { $(this).popover(‘show’); }); The main point is to override template with mouseleave() enabler. I hope this … Read more