Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134470

bxwebber on "How to make jQuery function work?"

$
0
0

I desperately need help with making a small piece of jQuery code work.
This is the original script code:

$(document).scroll(function () {
    var x = $(this).scrollLeft();
    if (x > 100) {
        $('.topMenu').fadeIn(300);
    } else {
        $('.topMenu').fadeOut(300);
    }

});

I allready have a child theme in place. I've tried by creating a .js file (in a child theme js folder) plus a child theme functions.php, after reading several sources on this forum, but without succes. It's difficult for me to 'translate' given examples to my specific code. What should go where?

Thanks!!


Viewing all articles
Browse latest Browse all 134470

Trending Articles