SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Dec 2009
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error: $ is not a function

    Hi,

    Firebug console giving error here ..


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Welcome to MyApps</title>
    <!--tab start-->
    <link type="text/css" rel="stylesheet" href="/MyApps/css/jquery-ui.css" />
    <script type="text/javascript" src="/MyApps/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="/MyApps/js/jquery-ui-1.10.3.js"></script>
    <link href="/MyApps/css/style.css" rel="stylesheet" type="text/css" />
    <!-- New Date Time Picker Start -->
    <link type="text/css" rel="stylesheet" href="/MyApps/css/jquery-ui-v10.css" />
    <link type="text/css" rel="stylesheet" href="/MyApps/css/jquery-ui-timepicker-addon.css" />
    <script type="text/javascript" src="/MyApps/js/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="/MyApps/js/dateTimePicker.js"></script>
    <script type="text/javascript">
    /*calendar start*/
    $(document).ready(function() { --------------------> TypeError: $ is not a function
    .....................................................
    .....................................................


    Can you please tell what is going wrong in my code ?

    I understand this kind error comes when jquery is not loaded ....but I can assure you that jquery path is correct and I can open jquery directly in browser when I type http://localhost:8080/MyApps/js/jquery-1.9.1.min.js


    I am clueless about the reason of the error.

    Need help at this part.

    Thanks

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by windowsxp View Post
    I understand this kind error comes when jquery is not loaded
    This is indeed normally true.

    Could you possibly share a link to your site?
    If this is not possible, could you please use this template to make a stand alone example that reproduces your problem.

  3. #3
    SitePoint Addict
    Join Date
    Dec 2009
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Issue resolved....it was a conflict issue.

    solution was to use jQuery(function ($) { instead of $(document).ready(function() {

  4. #4
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    8 Thread(s)
    That's good to hear.
    Is this a WordPress site by any chance?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •