jquery - ie8 addClass and removeClass not working, jQuery1900969595128946837 added to the div instead of class -


i have footer slide if bottom of page reached, , if element clicked. works adding / removing class active / footer.

but not work in ie8. class not assigned, , whenever bottom of page reached, goes , down, if has been clicked twice.

the class gets assigned if page @ bottom, , page refreshed automatically @ bottom on page refresh. class never gets removed.

again, bottom line adding / removing class not working in ie8 in case.

my code:

$(window).scroll(function() {    if($(window).scrolltop() + $(window).height() == $(document).height()) {        $('.footer .open').click();    } });  $('.footer').click(function(){     if($(this).hasclass('active')){         $('.footer').removeclass('active');         $('#page-footer').slideup();      }else{         $(this).addclass('active');         $('#page-footer').slidedown();      } }); 

edit:

i noticed added footer div in ie8. jquery1900969595128946837 instead of class='active'. stays always, if either slide or down.

any idea?

try on method instead of click:

$('.footer').on('click',function(){     if($(this).hasclass('active')){         $('.footer').removeclass('active');         $('#page-footer').slideup();      }else{         $(this).addclass('active');         $('#page-footer').slidedown();      } }); 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -