Skip to content Skip to sidebar Skip to footer

Javascript - Fadein Effect Uncaught Syntaxerror: Missing ) After Argument List

I'm loading a front-end site onto Wordpress and a javascript file that was working fine before has been edited to avoid any conflicts using $ for jQuery functions. Now I'm getting

Solution 1:

Here you go with correct syntax

$.noConflict();

jQuery(document).ready(function($) {
  var win = $(window),
    doc = $(document),
    tags = $("section");

  win.on("scroll", function() {
    tags.each(function(i, tag) {
      if ($(tag).position().top < (doc.scrollTop() + win.outerHeight())) {
        $(tag).addClass("visible");
      } else {
        $(tag).removeClass("visible");
      }
    });
  });
});

Hope this will help you.

Post a Comment for "Javascript - Fadein Effect Uncaught Syntaxerror: Missing ) After Argument List"