Uploaded image for project: 'Skin Intranet'
  1. Skin Intranet
  2. SKININTRA-271

Js error on scroll with minimal data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 1.19.2, 2.0.2, 2.1.0
    • None
    • None
    • None

      Each time I scroll I have many errors on this code, where position is null

                  var position = $j('.sticky-menu').offset();
                 
                  $j(window).scroll(function () {
                      var scroll = $j(window).scrollTop() + 108;
                      if (scroll >= position.top) {
                          $j('.sticky-menu').addClass('fixed');
                      } else {
                          $j('.sticky-menu').removeClass('fixed');
                      }
                  });
      

            Unassigned Unassigned
            raphael Raphaƫl Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: