Give help. Get help.

  • # March 3, 2013 at 10:42 pm

    I’m adding [this responsive nav script]( “”) to my theme. It requires putting this into the code:

    But I’d prefer to stick the jQuery link in functions.php, like this –

    wp_register_script( ‘jquery’, ‘’, null, ‘1.7.2’, false);

    But when I do that, the navigation no longer works. If I have links to the Google ajax libraries in both places it works fine. Why does it matter where I put the link?

    # March 3, 2013 at 10:44 pm

    To clarify, this is what’s in the header:

    If I remove the second reference to the Google ajax library, the navigation fails.

    # March 4, 2013 at 4:19 am

    Im assuming that you are using wordpress. Chris Coyier posted a nice little function to include inside your functions.php.

    This is the one i use and never have any problems:

    if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
    function my_jquery_enqueue() {
    wp_register_script('jquery', "http" . ($_SERVER == 443 ? "s" : "") . "://", false, null);

    Here is the article.

    # March 4, 2013 at 1:17 pm

    Thanks John. For some reason that doesn’t fix it.

    This code is what functions.php generates, but doesn’t help the nav work –


    Hard-coding this is the only thing that works –


    # March 4, 2013 at 3:10 pm

    I’m developing this theme locally, but my functions.php section looks like this –

    And the head stuff looks like this –

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.