• Hello all,

    I would like to refer to the following article:
    https://www.ads-software.com/support/topic/oceanwp-problem-jquery-is-not-a-function/

    I also have the oceanwp in use. I am running Elementor free with it.

    Unfortunately the problem still exists
    My java script code is as follows:

    
    $ = jQuery.noConflict(true);
    $(document).on("scroll", function(){
    		if
          ($(document).scrollTop() > 100){
    		  $("header").addClass("shrink");
    		}
    		else
    		{
    			$("header").removeClass("shrink");
    		}
    	});
    

    I get various error messages, if one looks times into the console of Firefox.

    Can someone help me? Or does anyone have a tip for me, how to fix this problem?

    • This topic was modified 2 years, 9 months ago by monacofranze.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Please try this code and check.

    jQuery = jQuery.noConflict(true);
    jQuery(document).on("scroll", function(){
    		if
          (jQuery(document).scrollTop() > 100){
    		  jQuery("header").addClass("shrink");
    		}
    		else
    		{
    			jQuery("header").removeClass("shrink");
    		}
    	});
    Thread Starter monacofranze

    (@monacofranze)

    That worked. Thank you very much!

    You are most welcome and glad to hear that solution worked well.??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘oceanwp Problem. jquery ” $ is not a function”’ is closed to new replies.