I’m new to using jquery and need help. I’m using the scrolltofixed.js and need help in adding the left: %%px. This is what I have so far:
$(document).ready(function() {
$('#socialbar').scrollToFixed( {marginTop: $('.header').outerHeight(true) + 7,});
$('#socialbar').bind('fixed', function() { });
$('#socialbar').bind('unfixed', function() { });
$('#sidebar').scrollToFixed({
marginTop: $('.header').outerHeight(true) + 15,
fixed: function() { },
});
});
This is what happends to #socialbar element when users start to scroll down the page:
z-index: 1000; width: 58px; position: fixed; top: 7px; left: 70px;
Thanks for the help,
Gregory S.
Take a look at
css()method: