Skip to content

Commit

Permalink
IE7 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed Mar 8, 2010
1 parent d08b26f commit 456d62c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#container {
width: 1000px;
width: 1200px;
margin: 100px auto;
}
ul, li {
Expand Down Expand Up @@ -46,4 +46,5 @@ ul, li {
text-decoration: none;
padding: 30px 45px;
width: 100%;

}
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<ul id="nav">
<li id="selected"><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">More About My Portfolio</a></li>
<li><a href="#">Contact</a></li>
</ul>
Expand All @@ -24,7 +25,11 @@
<script type="text/javascript" src="js/jquery.spasticNav.js"></script>

<script type="text/javascript">
$('#nav').spasticNav();
$('#nav').spasticNav({
easing : 'linear',
speed : 300,
overlap : 30
});
</script>
</body>
</html>
23 changes: 12 additions & 11 deletions js/jquery.spasticNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
$.fn.spasticNav = function(options) {

options = $.extend({
blobOverlap : 10,
transitionSpeed : 1500,
overlap : 10,
speed : 1500,
reset : 4000,
color : '#0b2b61'
color : '#0b2b61',
easing : 'easeOutElastic'
}, options);

return this.each(function() {
Expand All @@ -17,9 +18,9 @@

$('<li id="blob"></li>').css({
width : currentPageItem.outerWidth(),
height : currentPageItem.outerHeight() + options.blobOverlap,
left : currentPageItem.position().left - 1,
top : currentPageItem.position().top - options.blobOverlap / 2,
height : currentPageItem.outerHeight() + options.overlap,
left : currentPageItem.position().left - 2,
top : currentPageItem.position().top - options.overlap / 2,
backgroundColor : options.color
}).appendTo('#nav');

Expand All @@ -31,12 +32,12 @@
if ( $(e.target).is('a') ) {
blob.animate(
{
left : $(e.target).position().left - 1,
width : $(e.target).width()
left : $(e.target).position().left - 2,
width : $(e.target).parent('li').width()
},
{
duration: 1500,
easing : 'easeOutElastic',
duration: options.speed,
easing : options.easing,
queue : false
}
);
Expand All @@ -48,7 +49,7 @@
blob.animate({
width : currentPageItem.outerWidth(),
left: currentPageItem.position().left
}, options.transitionSpeed);
}, options.speed);
}, options.reset);
});

Expand Down

0 comments on commit 456d62c

Please sign in to comment.