Banner Fixed Floating in the sidebar through the footer
Hello everybody , I'm doing a floating banner for my blog in the sidebar , the more the banner is exceeding the footer , the blog is : http://www.aisenhor.com.br
My Code JS:
-
- jQuery(document).ready(function ($) {
-
- $('[data-toggle="tooltip"]').tooltip();
-
-
-
- $('ul.nav li.dropdown, ul.nav li.dropdown-submenu').hover(function() {
-
- $(this).find(' > .dropdown-menu').stop(true, true).delay(200).fadeIn();
-
- }, function() {
-
- $(this).find(' > .dropdown-menu').stop(true, true).delay(200).fadeOut();
-
- });
-
- //Começo Banner Flutuante
-
- $(function(){
-
- var jElement = $('.element');
-
- $(window).scroll(function(){
- if ( $(this).scrollTop() > 2000 ){
- jElement.css({
- 'position':'fixed',
- 'top':'30px',
- 'width':'360px'
- });
- }else{
- jElement.css({
- 'position':'relative',
- 'top':'30px'
- });
- }
- });
-
-
-
- });
- //Fim do Banner Flutuante
-
- });
-
-
-
Could anyone help me to redo this code doing with my banner does not exceed the footer ?