$ is not defined when using jquery code in express.js at parse.com

I think this problem comes from jquery not working, so please help me how to implement jquery in my main.js

(express.js controller) inparse.com

What i want to do

Load an image from parse cloud

and render this image toview template

(in .ejs file)

but i got $ is not defined

in parse.com log

I also added the line require('cloud/jquery.min.js');

my code

 /**
 * get user image
 */
app.get('/getUserImageAction',function(req,res){
var Documents = Parse.Object.extend("Documents"); // Documents class
var query = new Parse.Query(Documents); 
query.equalTo("imageOwner","234");
query.find({
success: function(imgObjects) {
var documentImage = imgObjects[0].get("imageFile");

$("documentImage")[0].src = documentImage.url();
Parse.Cloud.httpRequest({ url: documentImage.url()      }).then(function(response) {
// The file contents are in response.buffer.
   res.render('viewDocuments.ejs',{image:response.buffer});
  });
  },
 error: function(object, error) {
  res.render('hello.ejs',{message:+ error.code + " : " + error.message});

}
});
});

      

2) second - when commenting out this line , I get something in imgObjects

but got this error in the parsing log.

Result: Script ran out of memory

+1
javascript jquery express parse.com


source to share


No one has answered this question yet

See similar questions:

3
Getting images from Parse database in javascript?

or similar:

7428
How can I check if an element is hidden in jQuery?
4523
Thinking in AngularJS if I have a jQuery background?
4345
How to check if a checkbox is checked in jQuery?
3952
Setting "checked" for a checkbox with jQuery?
3915
Why does Google add while (1); into your JSON responses?
2644
Is there a function "exists" for jQuery?
2302
Add table row in jQuery
2245
How do I refresh the page using jQuery?
2101
jQuery scroll to element
1957
Disable / enable input with jQuery?



All Articles
Loading...
X
Show
Funny
Dev
Pics