WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] jQuery not Defined (Interfers with Prototype.js)

[Resolved] jQuery not Defined (Interfers with Prototype.js)

  • Guys i’m desperately need a LOT of help right now.

    I’ve tried every single combination for my jQuery to interact with my website, but prototype is already interacting, so its already used the $ variable.

    I’ve already did

    <?php wp_enqueue_script('jquery'); ?>
    <script type="text/javascript">
    jQuery(document).ready(function() {
    jQuery('#tabslide > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
    });
    </script>

    but I get this error:
    jQuery(“#tabslide > ul”).tabs is not a function

    I’ve also tried this:

    <script type="text/javascript">
    jQuery(function($) {
    $(document).ready(function() {
    $('#tabslide > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
    });
    });

    </script>

    but I get this error:

    Firebug's log limit has been reached. %S entries not shown.		Preferences
    [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://websitename.com/wp-includes/js/jquery/jquery.js :: anonymous :: line 11" data: no]

    I’ve also tried this:

    <?php wp_enqueue_script('jquery'); ?>
    <script type="text/javascript">
                jQuery.noConflict();
                jQuery(document).ready(function() {
                jQuery('#tabslide > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
                });
    </script>

    but it still spat back out at me and did this:

    jQuery("#tabslide > ul").tabs is not a function
    and another error message

    $ is not a function
    <em>[Break on this error]  var query = document.evaluate(expression, $(parentElement) || document,</em>

    which was located at prototype.js on line 1263.

    I need all the help I can get! Please help me.

    I’ve tried using this code as well
    jQuery(function($) { /* insert jQuery code here */ });

    but it just outputs a more error messages. help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • YES! resolved.

    GUYS! MAKE SURE YOUR SCRIPTACULOUS.JS script file is BEFORE your jQuery.JS FILE!

    ie:

    <script src="scriptaculous.js" type="text/javascript"></script>
     <script src="jquery.js" type="text/javascript"></script>

    and it should work.

    i used the code

    <script type="text/javascript">
            jQuery.noConflict();
    
            jQuery(function($) {
                $(document).ready(function() {
                    $('#tabslide > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
                });
            });
        </script>
    dremeda

    @dremeda

    Sucuri Wizard

    I am trying to utilize jquery to create this effect in my navigation:

    http://devthought.com/cssjavascript-true-power-fancy-menu/

    Problem is it wont work in WP for me.

    I tried moving the jquery scripts below scriptaculous but it breaks my glider and lightbox script.

    Any help would be great!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] jQuery not Defined (Interfers with Prototype.js)’ is closed to new replies.
Skip to toolbar