Banner Fixed Floating in the sidebar through the footer

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:

  1. jQuery(document).ready(function ($) {

  2.         $('[data-toggle="tooltip"]').tooltip();



  3.         $('ul.nav li.dropdown, ul.nav li.dropdown-submenu').hover(function() {

  4. $(this).find(' > .dropdown-menu').stop(true, true).delay(200).fadeIn();

  5. }, function() {

  6. $(this).find(' > .dropdown-menu').stop(true, true).delay(200).fadeOut();

  7. }); 

  8.    //Começo Banner Flutuante 

  9. $(function(){

  10. var jElement = $('.element');

  11. $(window).scroll(function(){
  12. if ( $(this).scrollTop() > 2000 ){
  13. jElement.css({
  14. 'position':'fixed',
  15. 'top':'30px',
  16. 'width':'360px'
  17. });
  18. }else{
  19. jElement.css({
  20. 'position':'relative',
  21. 'top':'30px'
  22. });
  23. }
  24. });

  25. }); 
  26. //Fim do Banner Flutuante

  27. });



Could anyone help me to redo this code doing with my banner does not exceed the footer ?
    • Topic Participants

    • fale