• Resolved EfDee

    (@faisyah)


    Hi!

    I fixed this problem on a test-host, but now I get this new error after installing the theme on my clients page. It’s supposed to make a black background under the menu when the menu hits the header text.

    URL: https://utsattmann.no

    Here’s the content in my .js file.

    jQuery(document).ready(function ($) {
    var scroll_start = 0;
    var startchange = $(“.hero-text-box”);
    var offset = startchange.offset();

    if (startchange.length) {
    $(document).scroll(function () {
    scroll_start = $(this).scrollTop();
    if (scroll_start > offset.top) {
    $(“nav”).css(‘background-color’, ‘rgba(0, 0, 0, 0.86)’);
    } else {
    $(‘nav’).css(‘background-color’, ‘transparent’);
    }
    });
    }
    });

    Error: TypeError: this.on is not a function

    a.fn.hoverIntent() admin-bar.min.js:1
    <anonymous> admin-bar.min.js:1
    .ready() jquery-1.4.2.min.js:26
    L() jquery-1.4.2.min.js:33

    Thank you in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey Farris—I’m not able to access your site. Are you currently pushing changes to it?

    Thread Starter EfDee

    (@faisyah)

    Hi cdcampbell26!

    I am making changes and such continuously at the moment, but that shouldn’t have any effect.

    The script is functioning properly when I am not editing the page, it probably crashed a bit with all the admin-things?

    Should this be of any concern?

    Thanks!

    Well I meant I wanted to check the site out to look at some other things such as other scripts firing, etc. as I added your above JS to a local install of WP and didn’t get the error. Your site isn’t loading for me so I’m not able to check it out.

    Thread Starter EfDee

    (@faisyah)

    Hm, I have not been using any maintainance mode or anything like that. Had someone check it out and the site was working for them.

    Thank for following up cdcampbell26. ??

    loading nice here, strangely,
    no errors in console,

    did you updated your code or? by the way it’s a nice site, well designed, reminds me of a commercial template.

    Thread Starter EfDee

    (@faisyah)

    Hi Digico Paris!

    Thank you for the compliment, though I followed tutorials to make it all from scratch, it as a lot of work, trial and error! ??

    The error went away when I’m not logged in.
    Unfortunately my client requested that I hide the new layout for now.

    Thank you so much for checking!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘TypeError: this.on is not a function’ is closed to new replies.