0

I'm trying to add jQuery UI like here http://learn.jquery.com/jquery-ui/getting-started/ in my grails project.

In my GSP I added this:

<r:require modules ="jquery, jquery-ui" />
<g:javascript lib="jquery" />
<jqui:resources theme="darkness" />


<script
    src="${resource(dir:'web_app', file:'jQuery/js/jquery-1.10.2.js')}"
    type="text/javascript"></script>
<script
    src="${resource(dir:'web_app', file:'jQuery/js/jquery-ui-1.10.4.custom.min.js')}"
    type="text/javascript"></script>

<g:link
    href="web-app/jQuery/css/ui-darkness/jquery-ui-1.10.4.custom.css"
    rel="stylesheet"></g:link>

<script>
    $(function() {
        $("#datepicker").datepicker({
            inline : true
        });
    });
</script>

and my input field looks like this:

<g:field type="date" class="time" name="start_date"
id="datepicker" placeholder="" />

My Grails Console gives me this errors: Error 2014-06-04 17:18:00,846 [http-bio-8080-exec-9] ERROR resource.ResourceMeta - Resource not found: /plugins/jquery-ui-1.8.24/jquery-ui/themes/darkness/jquery-ui-1.8.24.custom.css | Error 2014-06-04 17:18:00,968 [http-bio-8080-exec-9] ERROR resource.ResourceMeta - Resource not found: /web_app/jQuery/js/jquery-1.10.2.js | Error 2014-06-04 17:18:00,998 [http-bio-8080-exec-9] ERROR resource.ResourceMeta - Resource not found: /web_app/jQuery/js/jquery-ui-1.10.4.custom.min.js | Error 2014-06-04 17:18:02,145 [http-bio-8080-exec-9] ERROR resource.ResourceMeta - Resource not found: /plugins/jquery-ui-1.8.24/jquery-ui/themes/darkness/jquery-ui-1.8.24.custom.css

I don't understand why it is seraching file in dir:plugins and why it can't find web_app/jQuery/js/jquery-ui-1.10.4.custom.min.js when it is saved in that place (in web-app directory in my project). In Console of my browser I have this two errors: ReferenceError: jQuery is not defined and ReferenceError: $ is not defined

0 Answers0