0

i'm currently working on a chat extension for phpBB 3.1.x-3.2.x and need to replace a deprecated function in my js. i can't seems to get anything to work.

here's what i have

        setInterval(function(){
        var $chatscroll = $('div.shouts');
        if($chatscroll.is(':hover')) {
            $chatscroll.stop();
        }
        else {
           $chatscroll.scrollTop($('#chat').height());
        }
    }, 200);

i just can't seem to get the :hover replaced with something that works.

2
  • What is deprecated? Are you refering to this e.g: stackoverflow.com/questions/16497457/… ??? If ya, to handle multiple elements in set, you could use: if($chatscroll.filter(function(){ return $(this).is(':hover'); }).length){...}else {...}
    – A. Wolff
    Commented Apr 11, 2016 at 16:29
  • and that worked perfectly. thank you Commented Apr 11, 2016 at 16:37

0

Browse other questions tagged or ask your own question.