Moonstar Moonstar - 1 month ago 19
jQuery Question

Grails jQuery-UI In Assets

my problem is that my application.js looks like this

//= require plugins/jquery/3.1.0/jquery.min.js
//= require plugins/jquery-ui/jquery-ui.min.js
//= require spring-websocket


and the images are under assets/images/ . But when running the page the icons are missing because they are being searched under assets/images...

How to fix this problem? Any tips are welcome. Thanks in advance.

Answer

All CSS images should have the same path relative to the images folder as they have to the css file in the library distribution.

For example, if your library contains the files:

├── img
│   └── image.png
└── styles.css

Then your assets should be located under:

└── assets
    ├── images
    │   └── img
    │       └── image.png
    └── stylesheets
        └── styles.css