-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executing code after modal-body is loaded #5169
Comments
Could you use the jQuery .change() functionality? E.g. $('.modal-body').change( |
According to the docs, it just works for elements such as input, textareas, etc. El 17/09/2012, a las 21:03, Kunal Das notifications@github.com escribió:
|
Hey @Nerian, Thanks for opening this issue! Unfortunately, it looks like it fails to pass the criteria neccessary for submitting to bootstrap. The following things are currently failing:
For a full list of issue filing guidelines, please refer to the bootstrap issue filing guidelines. thanks! |
Sure, here it is. |
@koenpunt That last comment includes the jsfiddle :) |
My bad, did run |
the remote option was mostly just added for people using the data api. if you're using js, you might as well just call load yourself on your modal (that way you can listen for errors as well). thanks! |
@fat Not including this simple callback increases the complexity of the Javascript that you need to write.
That same argument can be made for With the
But without a
The fact that I have to go digging for jQuery's The change is simple, adds functionality that a number of people have asked for, and does so in a very straightforward way. I hope you'll reconsider your decision. |
I agree with Tyler. This will make enhancing Bootstrap much more easier and it just adds one line of code. Please add this. |
I would like to see this as well. |
Seconded, if remote is an option then I think a loaded event should be included as well |
+1 on this, is there an easy way, @fat what's the best way to add the 'loaded' event outside of a minified bootstrap-min.js |
Add me to the list of those needing this functionality. It became especially apparent in IE (9) where code in the 'click' handler for the link being used to open the dialog was being after before the 'shown' callback as well. |
+1 this should be merged |
Quasi-duplicate of #4735. |
+1 This is absolute crucial to make modals that load remote data work. I have an app that fetches HTML based on parameters passed to the controller action, and the response includes a form that relies on jquery validation. However, for validation to work, I have to wire up to the form after it has been added to the modal body. Without this fix, I have to manually call .load() as described above, and then open the modal once my form has been wired up. Very painful, when I could accomplish this with a data- attribute. |
+1 here too! Actually found it very surprising that it wasn't there to begin with, seems only natural to me. |
+1 Too. Please add it. |
+1 Was looking for the same thing :) |
Future +1s should probably be directed at #6846 instead. |
+1 This issue is potentially a show-stopper, now we're planning conversion from a custom developed front-end framework to Bootstrap |
+1 I would need this functionality too. |
@wimklerkx @Vinorcola I refer you both to #6846 (where someone has posted a workaround). |
Yeah without this it makes using the remote option pretty useless. Unless you're just loading HTML/CSS, then it's okay. |
+1 needed for google maps in a modal. |
Locking this, since |
I am using a modal with the remote option. I'd like to be able to execute some code once the modal-body is loaded.
Currently the only events we have available is
show
andshown
. I tried usingshown
but loading the modal-body occurs after the shown event is fired.How could I achieve this?
The text was updated successfully, but these errors were encountered: