popover

Twitter bootstrap popover trigger for desktop and mobile platforms

吃可爱长大的小学妹 提交于 2019-12-03 11:13:28
问题 Default popover trigger option is click. But I need to change it to hover. It can be done like this: $("#popover").popover({ trigger: "hover" }); But this doesn't make sense for smartphones. User can't read hover-triggered popover. For " div " parts of my site, I use "visible-desktop" or "hidden-desktop". Can you offer a good way to trigger popover with hover- for desktops trigger popover with click- for smartphones/tablets. (I use bootstrap 2.3.1) Related: Make Bootstrap Popover Appear

Pop over doesn't point over the button

本秂侑毒 提交于 2019-12-03 10:50:34
问题 I have an application that is compatible with both iPhone and iPad layouts. For iPhone layout I have created Action Sheet and Pop over for iPad. The problem is pop over's arrow does not point over the button I clicked. Below is my code.... let actionSheet = UIAlertController(title: "Choose an option", message: "Message", preferredStyle: .ActionSheet) ... if UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad { // for iPad actionSheet.popoverPresentationController?

Bootstrap Popover, .click not catching button inside popover

╄→гoц情女王★ 提交于 2019-12-03 10:33:09
First off, a fiddle of the problem: jsfiddle.net I am using a popover, and it's content is html, a button with class "click_me". I have jquery to listen for a click on "click_me" and it should throw an alert. However, it doesn't. Am I missing something? JS: jQuery(document).ready(function($) { $('.demo_button').click(function () { $(this).popover({ html: true, trigger: 'manual', placement: 'right', content: function () { var $buttons = $('#popover_template').html(); return $buttons; } }).popover('toggle'); }); $('.click_me').click(function() { alert('it works!'); }); }); HTML: <button class=

Auto hide bootstrap popover [closed]

ε祈祈猫儿з 提交于 2019-12-03 10:07:22
I want to hide automatically the Bootstrap popovers after a few seconds. When the user hovers over a control, the popover must be displayed, but if the user doesn't move the mouse pointer, this popover must be hidden automatically after few seconds. That is important because in a mobile phone or tablet when the user taps a control, the popover is displayed, and the focus remains on the same control while the user types something, with the popover hindering it. isherwood You really should give it a try and post your code before asking for help. This works, though there may be a more efficient

How to change the size of a popover

自作多情 提交于 2019-12-03 09:33:50
I'm having trouble changing the size of my popover presentation. Here is what I have so far override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) // func for popover { if segue.identifier == "popoverView" { let vc = segue.destinationViewController let controller = vc.popoverPresentationController if controller != nil { controller?.delegate = self controller?.sourceView = self.view controller?.sourceRect = CGRect(x:CGRectGetMidX(self.view.bounds), y: CGRectGetMidY(self.view.bounds),width: 315,height: 230) controller?.permittedArrowDirections = UIPopoverArrowDirection

NSPopover below caret in NSTextView

柔情痞子 提交于 2019-12-03 08:50:40
I know that in order to show a popover I need an NSView, but I don't think that there is one associated with the caret (inside the NSTextView). Is there a way to show a NSPopover below the caret? I tried to alloc a NSView and position it using (NSRect)boundingRectForGlyphRange:(NSRange)glyphRange inTextContainer:(NSTextContainer *)container , but the popover will not appear (and there's a reason, that method returns NSRect: {{0, 0}, {0, 0}} ). I'm not sure if you are still looking for answer. I recently was working on a project which happens to need a very similar feature like you described.

Bootstrap popover hides line breaks

扶醉桌前 提交于 2019-12-03 06:28:34
问题 I am using the html code as follows to show the bootstrap popover <a data-original-title="" data-content="Hi, Welcome ! Sincerely, programmer " data-placement="bottom"> content </a> And I initialized the popover as follows $(this).popover({ html:true }); All works fine but the problem is the content available in data-content not displayed with the spaces....It removes all the new lines and show it in the single line ....How can i overcome this.... 回答1: You need to use <br /> for new line in

bootstrap popover: reload content with ajax

筅森魡賤 提交于 2019-12-03 06:02:42
问题 I'm having trouble reloading content of a bootstrap popover with ajax. Here's some code: http://pastie.org/3960102 The second ajax request (when I click on "a.close") returns an updated content (I can see it in the console), but it is not loaded inside the popover. I looked around for solutions, none of them seem to work. What else can I try? Thank you 回答1: Instead of resetting the data-content attribute, you are able to directly access the popover tooltip content. Replace the following line:

How can I close a Safari App Extension popover programmatically?

岁酱吖の 提交于 2019-12-03 06:02:12
I'm building a Safari App Extension using XCode 8.3 and Swift 3, following the Safari App Extension Programming Guide . The extension includes a popover that appears when the extension's toolbar item is clicked. The popover view contains a few buttons linked to actions the user can perform. I want clicking one of these buttons to close the popover after its action has been performed. By default, clicking anywhere outside of a popover closes it, but I haven't been able to find any other way to close the popover, either in the guide or in the docs . I know that NSPopover has a performClose

display bootstrap popovers outside divs with overflow:hidden

折月煮酒 提交于 2019-12-03 05:44:00
问题 I've got a question about how to get a bootstrap popover to show above (outside) a slider, which has a wrapper of overflow:hidden, that I can't seem to get around. I'm using this slider: http://owlgraphic.com/owlcarousel/ I'm also using Twitter bootstrap 2.3.2 popovers: http://getbootstrap.com/2.3.2/javascript.html#popovers both work well together with the exception of the overflow:hidden on the carousel, which is similar to issues like this: Popovers in Bootstrap 2.2.1 https://github.com