• I am using the twentyten theme and am trying to insert a jquery horizontal navbar on my site(called Magicline)

    1) I created a custom page template (code is below)
    1) I put my html navbar code in my custom page template(below)
    2) I added the CSS code to my child css page (and the code does see it, cause I can control the colors)

    NOW… don’t know what to do with the js files.
    1) I put the following required lines of code in the header.php (before the ending /head)

    <script src=’jquery-1.7.1.min.js’></script>
    <script src=’jquery.color-RGBa-patch.js’></script>
    <script src=’example.js’></script>

    2) I put these 3 files in my Twentyten root, but files are not found (I am assuming, as the navbar does not function. The page looks the same as it does if I do not even upload the js files).

    I have tried every combination (putting them in a js folder and changing the path to /js, etc.

    I know the navbar works as I have it in a standard html website I built.

    My page is at http://doubledoubleny.com/test3/
    I would appreciate any help. Thanks.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Buffmin2

    (@buffmin2)

    I now understand that the jquery call should be in the “functions.php” file using

    wp_enqueue_script(“jquery”);

    I placed this code at the top of the functions.php page, but am not sure how to reference my js files. Any help would be appreciated.
    Thanks, Buffmin

    I am using Twentyten

    The top of my functions file is:

    <?php
    wp_enqueue_script('jquery');

    Did you ever resolve this? I cannot get magic line to work at all. CSS is fine but the js doesn’t seem to do anything and the magic line itself doesn’t appear.

    Thread Starter Buffmin2

    (@buffmin2)

    I ended up scrapping the project, so no. I never really did master wordpress, as I am comfortable (and busy) creating custom html/css dynamic sites. Never had the time to focus on customizing WP sites.

    I see you are a new member and adding jquery in WP can seem very confusing, as there is so much to research, but I did create a word doc that might help you with implementing jquery in general.

    Although it pertains to a different plugin called, it might help you understand how to implement jquery.

    The main thing it points out that there two ways to call your jquery. 1) Calling your jquery in your page template or 2) using shortcode.

    Email me at craig@cnjwebsolutions.com if you want, and I will send you the Word doc. It might help ya.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Jquery navbar. Where to put js files?’ is closed to new replies.