bootstrap-modal

Load Bootstrap modal on page load without firing button or using jQuery

余生长醉 提交于 2019-11-30 03:22:25
I'm trying to launch a Bootstrap modal on page load without firing a HTML button or using jQuery. Here's my code: <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"> <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css"> <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> <div id="my-modal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal

Open a Modal from another modal and close the first (launching) modal

回眸只為那壹抹淺笑 提交于 2019-11-30 00:33:09
I'm using Bootstrap Modal Window plugin its work fine but i would like to open another model window when i click next and close first one. how can i do it? $('[data-toggle="modal"]').click(function(e) { e.preventDefault(); var url = $(this).attr('href'); if (url.indexOf('#') == 0) { $(url).modal('open'); } else { $.get(url, function(data) { $(data).modal(); }).success(function() { $('input:text:visible:first').focus(); }); } }); <a href="next.html" data-toggle="modal">Add Record</a> next.html File Code <div class="modal fade" id="compose-modal" role="dialog" aria-hidden="true"> <div class=

How can I prevent body scrollbar and shifting when twitter bootstrap modal dialog is loaded?

此生再无相见时 提交于 2019-11-29 21:02:43
When I open the twitter bootstrap modal dialog, the backdrop causes a scrollbar and shift the content. To avoid the scrollbar I use this css: .modal { overflow: hidden; } But I can not avoid the shift. regards, Marko I am using Bootstrap Version 3 Marko, I just had the same problem. It appears that Bootstrap 3.0.0 adds a class to <body> , modal-open , when the modal first shows. This class adds margin-right: 15px to the body to account for a scrollbar, which is there on longer pages. This is great, except for shorter pages when a scrollbar isn't on the body. In the no scrollbar case, the

Angular 2 modals shared between components

假装没事ソ 提交于 2019-11-29 17:01:32
I have a typical Angular 2 app with many components. I installed this modal component: https://github.com/pleerock/ng2-modal . Is there a way to share the same modals between more components? I explain better. I would like the same modal should open on click of different buttons inside different components. Is it possible? I tried this kind of approach https://plnkr.co/edit/RgI1e9PobC7FloLHpEFD?p=preview but it's not the right way, because it always adds content to the modal. I post it here below my app.ts file: 21/12/2016 update Following @echonax suggestion, I updated my plunk: //our root

How to display more carousels in one row?

旧时模样 提交于 2019-11-29 16:32:25
I want to build an image gallery. Each picture would represent set of images. I kind of realized that nice solution to that would be this: each image would trigger a modal, and inside of a modal I would put carousel where other images would be displayed. But I ran into a problem, I am not able to make carousels to work properly (they are embedded in one row). Please check jsfiddle for more info: https://jsfiddle.net/r0ukv00d/4/ <div class="container"> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-12"> <img src="https://upload.wikimedia.org/wikipedia/commons/8/8e/Eyjafjallaj%C3%B6kull

Laravel 5.1 pass data from view to modal

亡梦爱人 提交于 2019-11-29 12:52:56
How can I pass data from blade view to modal dialog : For example : I pass $user from controller to view : $user = User::findOrFail($id); return view('user.show')->withUser($user); Next, I want to pass this data $user to a modal included in this view via a button like this : @include('user.edit',$user) ; and there in the modal I can set $user's values (like this : {!! $user->lastname !!} ) to edit them for example. Please Help me :) Saiyan Prince Try out this way. I am using a tag, but the solution should work for you as well with button. <a href="#" data-target="yourModalId" data-toggle=

fullcalendar not visible until button is clicked or window resized?

五迷三道 提交于 2019-11-29 10:45:43
I'm using jquery full calendar with angularJS and angularstrap. The problem it seems is that the calendar will only display when I either click on one of the buttons in the calendar or resize the browser window. This calendar is being loaded in a modal box initialised using angularstrap. I appreciate the help. Plunkr here: LINK Modal HTML is in search_modal.html Calendar controller is:calendarCtrl.js Parent controller is search.js Edit: After experiencing the same problem with google maps and a gallery I've attempted to implement I dont think this is a problem directly related to the calendar

Angular 2 - Open/Close default bootstrap modal

假装没事ソ 提交于 2019-11-29 06:13:43
问题 I do not want to use angular2-bootstrap or ng2-bs3-modal as suggested in the questions/answers Angular 2 Bootstrap Modal and Angular 2.0 and Modal Dialog Now. I know what opens and closes the bootstrap modal. The display is toggled between display: none; and display: block; An attribute toggles on the div between aria-hidden="true" and aria-hidden="false So, naturally I thought that if I bound to the aria-hidden attribute like so [aria-hidden]="true" , that I could manipulate it. Sadly though

Bootstrap : how to disable vertical scrollbar?

自古美人都是妖i 提交于 2019-11-29 05:53:11
问题 when my modal popup window opens, it adds a vertical scrollbar to the right of the browser window. How do i disable this? I think this is enabled when the modal window has a very large height value where it needs to scroll. i want to disable this as my form height does not exceed the window height. 回答1: In your css add : body { overflow-y:hidden; } 回答2: I have the same problem with bootstrap 3.0.0. It seems that .modal class has overflow-y: scroll rule which results in scrollbar always

Handle Bootstrap modal hide event in Vue JS

匆匆过客 提交于 2019-11-29 04:16:45
Is there a decent way in Vue (2) to handle a Bootstrap (3) modal hide-event? I found this as a JQuery way but I can't figure out how to capture this event in Vue: $('#myModal').on('hidden.bs.modal', function () { // do something… }) Adding something like v-on:hide.bs.modal="alert('hide') doesn't seem to work. Bootstrap uses JQuery to trigger the custom event hidden.bs.modal so it is not easily caught by Vue (which I believe uses native events under the hood). Since you have to have JQuery on a the page to use Bootstrap's native modal, just use JQuery to catch it. Assuming you add a ref=