WordPress.org

Support

Support » How-To and Troubleshooting » JQuery, WordPress and MAMP

JQuery, WordPress and MAMP

  • I’m developing a site using WordPress on a Mac, using MAMP and having problems getting JQuery to function. I’m not sure if this is due to an error I’m making with my coding or something to do with MAMP.

    Code snippet follows.

    <?php wp_enqueue_script(‘jquery’); ?>

    <!– Javascript for fade effect on main navigation –>
    <script type=”text/javascript”>
    jQuery(function() {
    // set opacity to nill on page load
    jQuery(“ul#menu span”).css(“opacity”,”0″);
    // on mouse over
    jQuery(“ul#menu span”).hover(function () {
    // animate opacity to full
    jQuery(this).stop().animate({
    opacity: 1
    }, ‘slow’);
    },
    // on mouse out
    function () {
    // animate opacity to nill
    jQuery(this).stop().animate({
    opacity: 0
    }, ‘slow’);
    });
    });
    </script>

    <?php wp_head(); ?>

    </head>

    Any advice appreciated,

    Martin

Viewing 1 replies (of 1 total)
  • I need help as well.. any advice would be apreciated!
    bascially the function call in the head document isn’t connecting with the javascript.. there has to be another way somehow…

Viewing 1 replies (of 1 total)
  • The topic ‘JQuery, WordPress and MAMP’ is closed to new replies.