user3709682
user3709682

Reputation:

Uncaught TypeError: Cannot read property 'post' of undefined Even JQuery included

I am getting this error even I have included JQuery in my page...

Uncaught TypeError: Cannot read property 'post' of undefined 

The line is causing the error is

 $.post("infusionsoft/infusion_soft_interaction.php", 
   {customerName: 'customerName', customerEmail: 'customerEmail'},
 function(data) {
        alert(data);
    });

Here is the HEAD section of my page.

http://pastebin.com/xK8dWQ1U

Upvotes: 2

Views: 6320

Answers (1)

Yury Tarabanko
Yury Tarabanko

Reputation: 45121

I believe the problem comes from the fact that you are using no-conflict mode for jQuery.

You need to reference it via jQuery.

jQuery.post("infusionsoft/infusion_soft_interaction.php", ...

or wrap your code with a function

(function($){
    $.post("infusionsoft/infusion_soft_interaction.php", ...
}(jQuery))

Upvotes: 8

Related Questions