Soft Rejection PROPER EVENT BINDING: Consider using the preferred .on() method rather than .click(), .bind(), .hover(), .load(), .ready(), etc.

Hi all,

view-source:http://lubababd.com/dodrin/contact.html

please review my code. In the bottom of the page, I wright my mag js code. I want to know, have any .on() method in there.

Thanks,
mirrortheme

Hi

As far I have check in main.js you have issues as like you have

$(".pl").click(function () {
        $(".sub-menu").toggle();
    });

Use .on method for click. Also will be better if you transfer google map js code from html file to main.js at bottom after })(jQuery);

Thanks

Hi,

Bind this code
$(".pl").click(function () { $(".sub-menu").toggle(); });

Like This:
$(".pl").on("click", function () { $(".sub-menu").toggle(); });

Hope will solved your issue.

1 Like

Also I have forgotten to mention please check all of your js if there anything which will need PROPER EVENT BINDING you have to fix all of those. Good Luck

thanks you

thanks you