Created
July 9, 2012 15:34
-
-
Save jamesflorentino/3077195 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="style.css" rel="stylesheet" /> | |
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script src="script.js"></script> | |
<div class="ipro_menu"> | |
<ul> | |
<li><a href="#">About</a></li> | |
<li><a href="#">Blog</a></li> | |
<li><a href="#">Portfolio</a></li> | |
<li><a href="#">Contact</a></li> | |
</ul> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() { | |
var cssOver = { 'padding-left': '25px' }, | |
cssOut = { 'padding-left': '15px' }, | |
overDuration = 100, | |
outDuration = 100, | |
selector = '.ipro_menu ul li'; | |
$(selector).mouseover(function(){ | |
var _this = $(this); | |
_this | |
.clearQueue() | |
.animate(cssOver, overDuration, function(){ | |
_this.animate(cssOut, outDuration); | |
}); | |
}); | |
} | |
$(main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body, html { | |
font-family: Helvetica Neue, Helvetica, sans-serif; | |
font-size: 1em/0.9em; | |
color: #111; } | |
.ipro_menu { | |
color: #111; | |
border: 1px solid #333; | |
display: inline-block; | |
width: 120px; | |
} | |
.ipro_menu ul { | |
display: block; | |
padding: 3px; | |
margin: 0; | |
} | |
.ipro_menu ul li { | |
padding-left: 15px; | |
} | |
.ipro_menu ul li a{ | |
-webkit-transition: 100ms; | |
-moz-transition: 100ms; | |
-ms-transition: 100ms; | |
-o-transition: 100ms; | |
transition: 100ms; | |
} | |
.ipro_menu ul li a{ | |
display: block; | |
cursor: pointer; | |
color: inherit; | |
text-decoration: none; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment