'Sticky' Menu jQuery
-
Hello! I’m trying to install a ‘sticky’ or fixed menu to my WordPress as per this demo. The method on doing so is here. I’ve been trying to apply it, with no success.
I’m not quite sure how to place new div containers around my menu so I’ve just been using #menu-main and .menu-main-container in place of everything that’s in the code (i.e. #stickynavigation).
I’ve also replaced all the instances of a ? with ‘jQuery’.
Unfortunately, since I am working on a local server I am unable to show you a live version. I should probably also point out that I’m using Thesis by DIYThemes and I’ve asked this question over there already, but haven’t been given directions that give me what I specifically need from this code. If you could match me up with any other code that catches the menu upon scroll (opposed to hesitating and catching the menu with a delay) as effectively as this one, that’s all I’ll need.
Thank you!
-
Also, I forgot to place it in up there but let me know if you need to see my code. As I said, I’m working with Thesis so my files might be a little different. I also have my jQuery in a folder inside of my Child Theme folder.
Generally you need to be looking at the browser’s console log when developing JavaScript. Browser developer tools like Firebug often have access to these logs, so if you’re not already, you really do need to be using them. It usually spits out useful JavaScript errors.
We can’t recommend anything specific because we don’t have access to commercial themes, so we wouldn’t know how they operate.
Alrighty, thank you for letting me know. I already use Firebug and wouldn’t be able to function without it, hahaha.
Anyway, quick question. I know you can’t really help me out much. Should this code work upon placing it in? Or does it need modifications for WordPress standards?
WordPress does have its little rules
http://codex.wordpress.org/Using_Javascript
http://codex.wordpress.org/Function_Reference/wp_enqueue_scriptIn particular, check out its section on noConflict wrappers.
Okay, thank you very much!
The topic ‘'Sticky' Menu jQuery’ is closed to new replies.