File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery not "seen" [ghost buster]

 
Jack Rackham
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all !

I've a matter, Grails doesn't seem to find jQuery, because when I try to execute an amazing $(document).ready(function(){ alert("love you so much")}; I have the following error :

$ is not defined



However I've followed the instructions of the doco :
http://www.grails.org/plugin/jquery

I've been looking for this for a while, and now I don't know what to do.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you viewed the source of the page to see if there is a script element pulling in jQuery?
 
Jack Rackham
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ! Here is the source of the HTML :

 
Jack Rackham
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK I found the solution. Just had to replace in the /layouts/main.gsp the <g:javascript library="prototype"/> by <g:javascript library="jquery" plugin="jquery"/>
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic