Intrepidity theme sidebar
-
I am using the Intrepidity theme and I populate the sidebar widget with some images which ideally would like them to scroll down with the page. Is there a JS or CSS I could use. SO far I tried the following:
CSS
#sidebar {
width: 190px;
position: fixed;
margin-left: 410px;
}and this JS:
<script type=”text/javascript”>
$(function() {
var offset = $(“#sidebar”).offset();
var topPadding = 15;
$(window).scroll(function() {
if ($(window).scrollTop() > offset.top) {
$(“#sidebar”).stop().animate({
marginTop: $(window).scrollTop() – offset.top + topPadding
});
} else {
$(“#sidebar”).stop().animate({
marginTop: 0
});
};
});
});
</script>I dont seem to get them to work.
Any advice would be appreciated.
cheers
- The topic ‘Intrepidity theme sidebar’ is closed to new replies.