Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
414 views
in Technique[技术] by (71.8m points)

php - Javascript Error in Ubuntu Uncaught ReferenceError: $ is not defined

I am working with jquery, javascript, php in Ubuntu Platform. In the page i am sending an ajax request through jquery to php file and getting response text. This program was running successfully in windows-(wamp) platform and online. But in Ubuntu i am getting javascript error. The code follows...

    url = "index.php";

    $.get(url,{
            'action': 'Loan',
        },
        function(responseText){     
            alert(responseText);
        },
        "html"
    );

In Ubuntu i am getting this error, "Uncaught ReferenceError: $ is not defined". This error was showing at $.get line. In the script tag i included jquery library file too. I dont know why this is error is coming. Please solve my issue. Thanks in Advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The error "Uncaught ReferenceError: $ is not defined" means that the JQuery library is not loaded.

You will find all CDN here to include the version of JQuery that you need


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...