Difference between revisions of "Template:2016Demo bottom"

Line 83: Line 83:
 
$( "#menuDisplay" ).load( "https://2015.igem.org/Menu/DemoSafety #Demo_mainpage", function() { // ALL OTHER CASES SHOWS MAIN MENU
 
$( "#menuDisplay" ).load( "https://2015.igem.org/Menu/DemoSafety #Demo_mainpage", function() { // ALL OTHER CASES SHOWS MAIN MENU
 
activateLoadedMenu();
 
activateLoadedMenu();
// MODIFIES THE CSS TO HIDE THE NAVIGATE BETWEEN MENUS BUTTON
+
 
 +
// MODIFIES THE CSS TO HIDE THE NAVIGATE BETWEEN MENUS BUTTON
 
$(".sideMenu").css( "padding-bottom", "0px" );
 
$(".sideMenu").css( "padding-bottom", "0px" );
 
$(".switch_Menus").css( "display", "none" );
 
$(".switch_Menus").css( "display", "none" );
Line 204: Line 205:
  
 
$( ".pop_why_content" ).load( which_why , function() {
 
$( ".pop_why_content" ).load( which_why , function() {
remove_popwhy();
+
 
 +
$(".pop_close").click(function() {
 +
remove_popwhy();
 +
});
 +
 
 +
$(".pop_why_cover").click(function() {
 +
remove_popwhy();
 +
});
 
} );
 
} );
  
 
+
//MODIFY SIZE AND POSITION OF THE POP DIV AND THE BACKGROUND
//MODIFY SIZE AND POSITION OF THE POP DIV AND THE BACKGROUND
+
 
$(".pop_why_content").css( "top", event.pageY);
 
$(".pop_why_content").css( "top", event.pageY);
 
$(".pop_why_cover").css ("height" , $(document).height() );
 
$(".pop_why_cover").css ("height" , $(document).height() );
 
$(".pop_why_cover").css ("width" , $(document).width() );
 
$(".pop_why_cover").css ("width" , $(document).width() );
  
// CALL BOTH ELEMENTS
+
// CALL BOTH ELEMENTS
 
$(".pop_why_content").show();
 
$(".pop_why_content").show();
 
$(".pop_why_cover").show();
 
$(".pop_why_cover").show();
Line 219: Line 226:
  
  
+
 
// IF THE CLOSE BUTTON IS CLICKED OR ANYTHING OUTSIDE THE POP WHY DIV
 
// IF THE CLOSE BUTTON IS CLICKED OR ANYTHING OUTSIDE THE POP WHY DIV
 
function remove_popwhy () {
 
function remove_popwhy () {
  
$(".pop_close").click(function() {
+
$(".pop_why_content").hide();
$(".pop_why_content").hide();
+
$(".pop_why_cover").hide();
$(".pop_why_cover").hide();
+
$( ".pop_why_content" ).empty();
$( ".pop_why_content" ).empty();
+
});
+
 
+
$(".pop_why_cover").click(function() {
+
$(".pop_why_content").hide();
+
$(".pop_why_cover").hide();
+
$( ".pop_why_content" ).empty();
+
});
+
  
 
}
 
}

Revision as of 20:27, 23 November 2015