Created
January 11, 2013 14:35
-
-
Save toast38coza/4511099 to your computer and use it in GitHub Desktop.
Expose an element in a Twitter bootsrap site: Will create a bootstrap overlay (as used by Bootstrap modal), and bring the desired element in front of the overlay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| /* CSS */ | |
| .expose{ | |
| position:'relative'; | |
| background-color:'#fff'; | |
| z-index:1050; | |
| } | |
| */ | |
| function expose(el) { | |
| el.addClass("exposed"); | |
| if ($(".modal-backdrop").length===0){ | |
| $("body").append("<div class=\"modal-backdrop fade\"></div>"); | |
| } | |
| $(".modal-backdrop").addClass("in"); | |
| } | |
| function unexpose(el){ | |
| $(".modal-backdrop").remove(); | |
| el.removeClass("exposed"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment