modal-dialog

How can I duplicate Pinterest website's modal effect?

北慕城南 提交于 2019-11-27 16:49:36
I would like to create the same effect as on Pinterest when you click on an image: a modal window opens up but the URL of the page also changes. This last part is crucial: the URL in the address bar of the browser has changed, but we still see the original page content in the background (that's why I call it a modal even though it may be much more complicated than that). I am ideally looking for a jQuery solution. [edit] I should add that of course the Pinterest behaviour does not break the Back button which is, again, crucial. arttronics This is my assessment of how Pinterest achieves it's

How to hide Bootstrap modal with javascript?

五迷三道 提交于 2019-11-27 16:47:26
I've read the posts here, the Bootstrap site, and Googled like mad - but can't find what I'm sure is an easy answer... I have a Bootstrap modal that I open from a link_to helper like this: <%= link_to "New Contact", new_contact_path, {remote: true, 'data-toggle' => 'modal', 'data-target' => "#myModal", class: "btn btn-primary"} %> In my ContactsController.create action, I have code that creates Contact then passes off to create.js.erb . In create.js.erb , I have some error handling code (a mix of ruby and javascript). If everything goes well, I want to close the modal. This is where I'm having

How to show a URL in Bootstrap Modal dialog: On button click

Deadly 提交于 2019-11-27 16:42:21
问题 I have to load a page (internal URL) in a modal window. I had been using window.showModalDialog(url, null, features) but this does not work properly on Safari,Chrome. So we decided to use Bootstrap's modal dialog instead. I'm unable to make this work. Any ideas what I could be doing wrong? //imports <script src="http://code.jquery.com/jquery.js"></script> <script src="js/bootstrap.min.js"></script> <link href="css/bootstrap.min.css" rel="stylesheet"> //activate content as modal $(document)

Bootstrap Modal does not work on iOS devices

守給你的承諾、 提交于 2019-11-27 15:59:25
问题 I am working on a website using Bootstrap and have a problem I can't seem to fix. Here is the draft of the site. On the "What We Do" panel, I made a clickable modal window on the first thumbnail box (it says "Enterprise Software development" under the thumbnail). If you click the thumbnail on a non-mobile device, a modal window will pop-up. On a desktop computer (or laptop), it works just fine. But on a iOS (iPhone, iPad, etc.) it doesn't work at all: i.e. tapping it doesn't bring up the

Fancybox, Custom Open Transition

允我心安 提交于 2019-11-27 15:27:06
问题 Does anyone know how you open a fancyBox with a custom open transition: http://fancyapps.com/fancybox/ Im looking to achieve a similar transition to the example found here: http://www.zurb.com/playground/reveal-modal-plugin I love the reveal plugin but its not got a few of the features I require that fancyBox does for a new project Many thanks, Sam 回答1: Fancybox can have the same opening effect as in the sample you provided but not the same closing effect though. To achieve the same opening

Showing a modal NSWindow, without activating the other application windows

六月ゝ 毕业季﹏ 提交于 2019-11-27 15:11:28
问题 I have an NSStatusItem that is properly displaying in the MenuBar. One of the items (when clicked) displays a modal NSWindow from my application, which is meant to perform a one-off task, then disappear. (Eg. the user enters a small bit of text, clicks "Save", and the modal NSWindow goes away.) The issue occurs when the application is running in the background. The modal window properly appears above whatever application is running in the foreground, but when the user clicks the "Save" button

jQuery dialog popup

巧了我就是萌 提交于 2019-11-27 14:32:25
问题 I am trying to get this dialog popup form to show up when this link is clicked but it does not work for me. I've been working on this for the past three hours and this is getting too frustrating for me. Here's my HTML: <a href="#" id="contactUs">Contact Us</a> <div id="dialog" title="Contact form"> <p>appear now</p> </div> And here's my JavaScript, this is in an external file: $("#contactUs").click(function() { $("#dialog").dialog("open"); return false; }); I've used these links, but to no

Display Bootstrap Modal First time page loads

大憨熊 提交于 2019-11-27 14:31:51
I'm trying to display a bootstrap modal when a person first visits a page (after logging into my app). I want to use the modal to offer a "Getting Started" video and also offer a "don't show this to me a again" checkbox so a visitor can bypass the "getting start modal" on future logins. I was able to get the modal to display on page load with the following tutorial: Launch Bootstrap Modal on page load But now I'm stuck on how to get it display only the first time a user visits the page after logging in. (it currently launches on page refreshes etc) I'm new to javascript and programming and

Autofocus input in twitter bootstrap modal

こ雲淡風輕ζ 提交于 2019-11-27 14:16:01
I have such problem - I need to autofocus some element inside twitter bootstrap modal (after it shows). The tricky part is here - content of this modal is loaded using 'data-remote' (jQuery.load method) from separate HTML file, so $(document).on('shown', ".modal", function() { $('[autofocus]', this).focus(); }); works only if modal was loaded before. The question is - how to make autofocus work at the first time modal loads? I'm using Bootstrap 3.0 (hopefully, this works with 3.1 as well). We had to use tabindex="-1" because that allows the ESC key to close the modal. So I was able to fix this

Make twitter Bootstrap popup modal slide and stick to bottom of page

泄露秘密 提交于 2019-11-27 14:14:19
问题 I am using bootstrap 2.3 and I have a modal that slides from the bottom of the page after a few seconds and I want it to stick to the bottom of the screen. Everything is working except when you resize the browser height the modal doesn't stick to the bottom. Please help! This is what the pop-up looks like: https://www.dropbox.com/s/kn257b07hdle52i/Screenshot%202014-10-27%2016.09.12.png?dl=0 It sticks until you resize the window, then this: https://www.dropbox.com/s/r0x4mkpj9xvsu61/Screenshot