Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function sticky_relocate() {
- var window_top = jQuery(window).scrollTop();
- var div_top = jQuery('#main').offset().top;
- if (window_top > div_top)
- jQuery('.adscrollleft').addClass('fixedsidebar')
- else
- jQuery('.adscrollleft').removeClass('fixedsidebar');
- }
- // If you have jQuery directly, use the following line, instead
- jQuery(function() {
- // If you have jQuery via Google AJAX Libraries
- // google.setOnLoadCallback(function() {
- jQuery(window).scroll(sticky_relocate);
- sticky_relocate();
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement