Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Hide modal by ID when there are more modals

John:

I have a page with several modals and I open them by unique ID, like this:


%a{"data-toggle" => "modal", href: "#modal-123", role: "button"}
%a{"data-toggle" => "modal", href: "#modal-456", role: "button"}

This works fine, but the problem is closing a specific modal. By default this is done by this:


.modal.fade{:style => "display: none;", :tabindex => "-1", id: "modal-123"}
.modal-dialog
.modal-content
.modal-header
.modal-body
.modal-footer
%button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} Close

But this doesn't work because it doesn't know which of the modals to close. How can I make it close the modal with the specific ID?



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Hide modal by ID when there are more modals

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×