• jason

    (@jasonpartnersdesignnet)


    Hi Folks,

    I’m in the process of adding a wordpress blog to our website to make news updates easier and more functional. Basically I wanted it to replicate our current html news section.

    Old news section: https://www.partnersdesign.net/news.html
    new wp enabled news section: https://www.partnersdesign.net/news
    current website(if needed): https://www.partnersdesign.net

    I’ve got my styling pretty much where I want to be, however the big problem is the javascript navigation in th header that was built for our current site. I simply wanted to reuse it and incorporate it into the header.php of the wordpress news. I thought I had luck doing this by adding absolute paths to the numerous image and url links that were in the js code. It was working great until I tested it on some other machines. I found that sometimes the menu doesn’t appear. It’s like the browser isn’t seeing/reading the script src (head_wp.js) that runs the menu.

    It doesn’t show up in IE, sometimes does/sometimes doesn’t show in firefox, and always shows in chrome. I’m sorry I’m at my wits end trying to get this working. Obviously I’m pretty new to this. Any help would be super-appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jason

    (@jasonpartnersdesignnet)

    Thanks esmi,

    I read through the page and tried some things.

    I used this code between the <meta> and <link> tags:

    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/mootools.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/nav.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/studio.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/AC_RunActivecontent.js"></script>

    And then create the div that displays the menu after the </head>:

    <div id="header">
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/head_wp.js"></script>
    		</div><!-- #header -->

    And it functions that way on FF4, Chrome and Safari. But it still isn’t displaying in IE and FF 3.6

    I’ve also tried enqueueing mootools first, but that didn’t work either. I’m not sure if I need to enqueue all my initial scripts.

    I’m going to keep trying here. Hopefully a breakthrough will come soon. Anybody know what might be wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Javascript Menu Disappears’ is closed to new replies.