forum

Home / DeveloperSection / Forums / How to possible conflicting jquery libraries?

How to possible conflicting jquery libraries?

Anonymous User 1887 30-Jan-2015

I'm using the 'reveal modal' which is working fine with the jquery-1.4.4. library however since adding the library the 'pop-up' menu for the mobile version of the site has stopped working. I removed the jquery-1.4.4. library and the 'pop-up'menu started working again but the modal stopped so I assume there is something conflicting with that library.

I have tried a piece of script that allows multiple jquery libraries without conflict but it didn't seem to work so I'm thinking the easiest way is to maybe re-wrtie the code for the 'pop-up- menu in a way that doesnt conflict but i'm not sure how.

The code I'm using for the pop-up' menu is as follows. (the menu only shows up on mobile size so you may have to decrease the width of your browser)

$(function() {
        var pull  = $('.pull');
            menu   = $('.navigation ul');
            menuHeight  = menu.height();
 
        $(pull).on('click', function(e) {
            e.preventDefault();
            menu.slideToggle();
        });
 
 
        $(window).resize(function(){
            var w = $(window).width();
            if(w > 320 && menu.is(':hidden')) {
                menu.removeAttr('style');
            }
        });
    });


Updated on 30-Jan-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By