Revision: 26701
Updated Code
at May 6, 2010 21:03 by jgiuffrida
Updated Code
$(document).ready(function() {
var theLoc = $('#leftNav').position().top;
$(window).scroll(function() {
if(theLoc >= $(document).scrollTop()) {
if($('#leftNav').hasClass('fixed')) {
$('#leftNav').removeClass('fixed');
}
} else {
if(!$('#leftNav').hasClass('fixed')) {
$('#leftNav').addClass('fixed');
}
}
});
});
Revision: 26700
Updated Code
at May 6, 2010 20:13 by jgiuffrida
Updated Code
$(document).ready(function() {
var theLoc = $('#leftNav').position().top;
$(window).scroll(function() {
(theLoc >= $(document).scrollTop())
? $('#leftNav').removeClass('fixed')
: $('#leftNav').addClass('fixed');
});
});
Revision: 26699
Updated Code
at May 6, 2010 20:13 by jgiuffrida
Updated Code
$(document).ready(function() {
var theLoc = $('#leftNav').position().top;
$(window).scroll(function() {
(theLoc >= $(document).scrollTop())
? $('#leftNav').removeClass('fixed')
: $('#leftNav').addClass('fixed');
});
}
Revision: 26698
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 6, 2010 20:06 by jgiuffrida
Initial Code
$(document).ready(function() {
var theLoc = $('#leftNav').position().top;
$(window).scroll(function() {
(theLoc >= $(document).scrollTop()) ? $('#leftNav').removeClass('fixed') : $('#leftNav').addClass('fixed');
});
}
Initial URL
http://www.josephgiuffrida.com/
Initial Description
Initial Title
Using jQuery to Create a Fixed Sidebar - JS - fixedSide.js
Initial Tags
Initial Language
JavaScript