@import url('https://use.fontawesome.com/releases/v5.2.0/css/all.css');
@import url('https://www.cssscript.com/wp-includes/css/sticky.css');
@import url('https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css');
@import url('https://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css');
/*
This defines the workspace where i place the demo.
*/
#container {
align-content: left;
text-align: left;
background: #FFF;
width: 0px;
margin: 0px auto;
padding: 0px;
border-left: 1px solid #CCC;
border-right: 1px solid #CCC;
-moz-box-shadow: 0px 0px 10px #BBB;
-webkit-box-shadow: 0px 0px 10px #BBB;
box-shadow: 0px 0px 10px #BBB;
}
/*
It defines the layer which will cover the site once the
floating window is showed.
*/
#darkOverlay {
background: none repeat scroll 0 0 rgba(255, 255, 255, 0.8);
cursor: auto;
display: none;
/*hidding if there's no call */
height: 100%;
left: 0;
overflow-y: auto;
position: fixed;
top: 0;
width: 100%;
z-index: 100;
/*over everything */
}
/*
We want the content to be center...
*/
#floatWrap {
margin: 0 auto;
position: static;
width: 878px;
z-index: 102;
}
/*
Defining the window wrap...
*/
#floatContent {
float: left;
background: white;
box-shadow: 0 3px 8px rgba(34, 25, 25, 0.4);
z-index: 101;
/*over the overlay*/
margin: 80px 0 80px 0;
position: relative;
}
/*
Defining the window...
*/
#mainFloat {
float: left;
margin: 0;
width: 900px;
min-height: 500px;
position: relative;
/*witht his background we divide visually
the space*/
background: url('imgs/bgFloat.gif') repeat-y #fff;
}
/*
Adding the X for closing the window
*/
.close {
position: absolute;
top: -15px;
right: -15px;
width: 30px;
height: 30px;
background: transparent url('imgs/fancybox.png') -40px 0px;
cursor: pointer;
z-index: 1103;
display: inline;
}
/* Left tabs menu*/
#menuLeft {
float: left;
width: 223px;
margin: 90px 0 0...
JavaScript
$(document).ready(function() {
$('#my_popup').popup({
background: false,
opacity: 0.1,
transition: 'all 1s'
});
});
$(document).ready(function() {
/*
We use this to hide the floating window in case they click outside it.
As html will be 'everything', we will use then an stopPropagation event.
*/
$('html, .close').click(function() {
$('.selection').hide();
$('#darkOverlay').hide();
$("body").css("overflow", "visible");
});
/*
Here we use the stopPropagation event in order to prevent hidding the
floating window when we click anywhere inside the #mainFloat element.
*/
$("#mainFloat").click(function(event) {
event.stopPropagation();
});
/*
Adding the option to hide the windows by pressing the 'escape' (ESC)
key with the keyboard.
*/
$(document).keyup(function(e) {
if (e.keyCode == 27) {
$('#darkOverlay').hide();
$("body").css("overflow", "auto");
}
});
/*
Clicking over the .floatMenu selector, we will show the floating window.
*/
$('.floatMenu').click(function(event) {
// Showing the floating window
$('#darkOverlay').show();
// Hidding the background page scroll
$("body").css("overflow", "hidden");
/*default content for the first tab. (you could use
JSON, .load, append... whatever you want */
$("#infoContent").html('Hello world');
// When clicking on the left tab menu...
$('.floatCategory').click(function() {
// Chaning the active tab...
$(this).parent().addClass("active").siblings().removeClass('active');
//We have to know in which tab the user has clicked
//so we take the attribute 'data-content' as an identifier of the tab
var...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.