WordPress.org

Ready to get started?Download WordPress

Forums

Whats wrong with my jquery, $ not defined! (3 posts)

  1. rugbert
    Member
    Posted 4 years ago #

    Im trying to use this jquery script Tablesorter which states that all I have to do it put this in `
    $.noConflict();
    jQuery(document).ready(function(){
    $("#myTable").tablesorter();
    });

    and its fine. but firfox's error console keeps telling me that "$ is undefined"
    
    Im calling my jquery file and the table.js file like this:

    <script type="text/javascript" src="<?php echo get_option('home'); ?>/table.js"></script>
    <script type="text/javascript" src="<?php echo get_option('home'); ?>/jquery.js"></script>
    `

    but no matter what I do I keep getting the undefined error.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

  3. rugbert
    Member
    Posted 4 years ago #

    ah I see, well I added the $:

    jQuery(document).ready(function($){
            $("#myTable").tablesorter();
     });

    but now I get:

    $("#myTable").tablesorter is not a function

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.