Skip to content

Instantly share code, notes, and snippets.

@toast38coza
Created January 11, 2013 14:35
Show Gist options
  • Save toast38coza/4511099 to your computer and use it in GitHub Desktop.
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
/*
/* 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