I'm trying to use some jquery in my project and as soon as I tried using it I came across an error in copied code and can't get any google help on it
var jquery = require('jquery');
var $ = jquery.create();
^
TypeError: Object function ( w ) {
if ( !w.document ) {
throw new Error( "jQuery requires a window with a document" );
}
return factory( w );
} has no method 'create'
Long story:
I'm trying to get plaintext from some html I have.
I hope to use .text()
function which supposedly does that.
My resulting code should be:
console.log($(data).text());