I have a Grails 2.0.0 project that was created using grails create-app
. In my HTML and GSP files, I\'m trying to include jquery.js
. I\'ve tried all of
I saw a good tutorial on that in icodeya. http://www.icodeya.com/2012/09/grails-different-ways-to-import.html
you can either do this in your gsp:
OR you can do this in your Config.groovy:
grails.resources.modules = {
core{
resource url:'/js/jQuery.js'
}
myScript {
resource url:'/js/myScript.js'
dependsOn 'core'
}
}
then, in your gsp, you can attach this: