WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] jQuery not Defined (Interfers with Prototype.js) (3 posts)

  1. nintensity
    Member
    Posted 5 years ago #

    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!

  2. nintensity
    Member
    Posted 5 years ago #

    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>
  3. dremeda
    Sucuri Wizard
    Posted 5 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic