Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript problem with submenu on smartphone Reply To: problem with submenu on smartphone

#248536
SirenaColella
Participant

Hello guys. I thank @Beverley and @I.m.learning for the support. Your messages were precious. In fact there is a conflict in custom.js file. Is there a way to ensure that these instructions of code just for smartphones and tablets?

<script>
$ (Function () {
     $ (. “Dropdown”). Hover (
             function () {
                 $ (‘. Dropdown-menu’, this) .stop (true, true) .fadeIn (“fast”);
                 $ (This) .toggleClass (‘open’);
             },
             function () {
                 $ (‘. Dropdown-menu’, this) .stop (true, true) .fadeOut (“fast”);
                 $ (This) .toggleClass (‘open’);
             });
     });
</script>

In practice, there is a mediaquery for javascript? I wish that for laptops this code is working. For smartphones and tablets not.