Skip to content

Instantly share code, notes, and snippets.

@et4891
Created February 10, 2014 09:26
Show Gist options
  • Save et4891/8912862 to your computer and use it in GitHub Desktop.
Save et4891/8912862 to your computer and use it in GitHub Desktop.
CSS Slide Out Navigation using a little jquery
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CSS slide out menu</title>
<link rel="stylesheet" href="css/main.css">
<script src="js/jquery.js"></script>
<script>
$( document ).ready(function() {
/*Toggle menu-open*/
(function(){
var body = $('body');
$('.menu-toggle').bind('click', function(){
body.toggleClass('menu-open');
return false;
});
})();
/*Click Show*/
(function(){
var hide = $('.hide');
var show = $('.show');
$('.show').bind('click', function(){
hide.toggleClass('hidden button');
show.toggleClass('hidden button');
return false;
});
})();
/*Click Hide*/
(function(){
var show = $('.show');
var hide = $('.hide');
$('.hide').bind('click', function(){
show.toggleClass('hidden button');
hide.toggleClass('hidden button');
return false;
});
})();
});
</script>
</head>
<body class="menu">
<header>
<a href="#">
<span class="menu-toggle show button">Show Menu</span>
<span class="menu-toggle hidden hide">Hide Menu</span>
</a>
<nav class="menu-side">
This is a side menu
</nav>
</header>
<p>
I setup the `mail.php` with the hotmail connection and it worked fine locally but after I uploaded it onto a domain I get this error.
Swift_TransportException
Connection could not be established with host smtp-mail.outlook.com [Connection refused #111]
I do know there are lots other email options such as google / yahoo / and lots others but since I got hotmail setup I'm wondering if anyone knows the result for this.
Thanks for helping.
Edit:
I actually tried with gmail account too but...I get the same error too
Swift_TransportException
Connection could not be established with host smtp.gmail.com [Connection refused #111]
</p>
<p>
I setup the `mail.php` with the hotmail connection and it worked fine locally but after I uploaded it onto a domain I get this error.
Swift_TransportException
Connection could not be established with host smtp-mail.outlook.com [Connection refused #111]
I do know there are lots other email options such as google / yahoo / and lots others but since I got hotmail setup I'm wondering if anyone knows the result for this.
Thanks for helping.
Edit:
I actually tried with gmail account too but...I get the same error too
Swift_TransportException
Connection could not be established with host smtp.gmail.com [Connection refused #111]
</p>
</body>
</html>
.menu
{
overflow-x: hidden;
position: relative;
left: 0;
}
.menu-open
{
left: 231px;
}
.menu-open .menu-side
{
left: 0;
}
.menu-side,
.menu
{
-webkit-transition: left 1s ease;
-moz-transition: left 1s ease;
transition: left 1s ease;
}
.menu-side
{
background-color: #333;
border-right: 1px solid #000;
color: #fff;
height: 100%;
width: 210px;
left: -231px;
top: 0;
padding: 10px;
position: fixed;
}
.hidden
{
display: none;
position: relative;
left: 0;
}
.button
{
color: #fff;
font-size: 18px;
padding: 8px 16px;
display: inline-block;
text-decoration: none;
border-radius: 10px;
border: 0;
margin: 0;
background-color: #5543F9;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment