I'm trying to install the jQuery plugin for Grails. Now I have a path and an include but it's pointing to js/jquery/jquery-1.4.3.js
. I would like to change this. Following the documentation I should add
jquery {
sources = ''
version = '开发者_Go百科1.4.4'
}
To my Config.groovy
file. Having done this I see no change. What is the correct way to change the include or do I need to simply move and rename the file?
ref: http://www.grails.org/plugin/jquery
Add to config.groovy
jquery {
sources = 'jquery' // Holds the value where to store jQuery-js files /web-app/js/
version = '1.4.4' // The jQuery version in use
}
Then
grails clean
grails run-app
It work for me
You can also download Jquery from it's site and then put it in your web-app/js. Next simply include it on top of your page or in your layout.gsp with something like..
<script type="text/javascript" src="${resource(dir: 'js', file: 'jQuery-144.js')}"></script>
That's all there is to start using jQuery.
Hope it helps..
精彩评论