i want to use ajax in my node js project , but after runnig the project , i see following error :
TypeError: Object function ( w ) {
if ( !w.document ) {
throw new Error( "jQuery requires a window with a document" );
}
return factory( w );
} has no method 'ajax'
my code is :
var jq = require('jquery');
jq.ajax({
type: "POST",
url: "http://localhost/sms/index.php",
});