Landing Page with responsive
by Gulam Jilani
HTML
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<div class="LandingPage">
<div class="Header Section">
<div class="Navigation">
<div class="MobileButton">Menu</div>
<ul>
<li><a onclick="highlightItem('.VirtualEmployee');" class="active home">Home</a></li>
<li><a onclick="highlightItem('.Calculator');" class="">Calculator</a></li>
<li><a onclick="highlightItem('.Requirements');" class="">Requirements</a></li>
<li><a onclick="highlightItem('.Recruitment');" class="">Recruitment</a></li>
<li><a onclick="highlightItem('.Decisions');" class="Decision">Decision</a></li>
<li><a onclick="highlightItem('.Contacts');" class="Contact">Contact</a></li>
</ul>
</div>
</div>
</div>
<div class="VirtualEmployee Section">
<h1>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</h1>
</div>
<div class="Calculator Section">
<h1>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release...
CSS
.LandingPage .Section { padding:100px 0 0;}
.LandingPage .Section .Content .Container { text-align:center;}
.LandingPage .Section .Content .Container .Inner { display:inline-block; text-align:left; position:relative; width:100%; max-width:800px;}
.LandingPage .Section .Content .Container .Inner.FullWidth { width:100%;}
.LandingPage .Section a { color:#ffffff;}
.LandingPage .Section .Container { width:100%; max-width:1000px; margin:0 auto; position:relative;}
.LandingPage .Header { box-sizing:border-box; padding:0 20px; min-height:auto; padding:0 20px; position:fixed; top:0; left:0; right:0; width:100%; margin:0 auto; height:auto; z-index:1000; background-color:#4578ac;}
.LandingPage .Header .Navigation { display:block; margin:20px auto 0; width:100%; max-width:1000px; }
.LandingPage .Header .Navigation ul { border-radius:20px; overflow:hidden; background-color:#4578ab; box-shadow:0 2px 5px #295c8f; display:block; font-size:0; margin:0; padding:0; width:100%;}
.LandingPage .Header .Navigation ul li { border-right:1px solid #4578ab; box-sizing:border-box; display:inline-block; text-align:center; width:16.6667%;}
.LandingPage .Header .Navigation ul li:last-child { border:0;}
.LandingPage .Header .Navigation ul li a { background:url("../images/forward_button.png") no-repeat scroll left 97% center; cursor:pointer; background-color:#0055a9; display:block; font-size:16px; padding:10px 10px;}
.LandingPage .Header .Navigation ul li a.active { background-color:#000000; color:#ffffff;}
.LandingPage .Header .MobileButton { box-shadow:0 0 5px #000000; text-align:center; background: #000000; border: 1px solid #000000; color: #ffffff; cursor: pointer; font-size: 18px; font-weight: 100; padding: 10px 20px; display:none;}
.Section { box-sizing:border-box; position:relative; min-height:100%;}
@media (min-height:901px) {
.LandingPage .Section .Content .Container .Inner { transform: scale(1.2); margin: 7% 0 0;}
...
JavaScript
/* IE6 No Support Message ------------------------------------------------------------------------------------*/
var navList = $(".LandingPage .Header .Navigation ul");
$(".LandingPage .Header .MobileButton").click(function () {
if (navList.is(':hidden')){
$(".LandingPage .Header .Navigation ul").slideDown();
}
else {
$(".LandingPage .Header .Navigation ul").slideUp();
}
});
$(function () {
setTimeout(function () {
var chatButton = $(".LPMcontainer");
if (chatButton.height() < 151) {
$(chatButton).addClass("LPMcontainerSmall");
}
else {
$(chatButton).removeClass("LPMcontainerSmall");
}
}, 0);
var navList = $(".LandingPage .Header .Navigation ul");
var link = $(".LandingPage .Header .Navigation ul li");
$(link).click(function () {
$(link).siblings().find("a").removeClass("active");
$(this).find("a").addClass("active");
});
$(link).click(function () {
if ($(window).width() < 641 ) {
navList.slideUp(0);
}
});
var offset = $(".Section").offset().top;
var main = offset-$(window).scrollTop();
var final = main;
if ($.browser.msie && $.browser.version == "6.0") {
var ie6Content = "<div style='width:665px; height:256px; position:absolute; left:50%; top:50%; margin-left:-332px; margin-top:-128px;'><h1>Sorry</h1><p id='ie6Content'>This site is not supported by Internet Explorer 6 <br /> Please upgrade your version of Internet Explorer or use a different browser</p></div>";
$('body').empty().html(ie6Content);
return;
} else {
/* Global Variables ------------------------------------------------------------------------------------*/
var currentPage;
...