xSlok xSlok - 1 month ago 14
Javascript Question

Eclipse image assets not being found?

I'm having some trouble with assets in eclipse, how to I access them in javascript?

this is my project's structure:

enter image description here

Already tried "/assets/images/spinner.gif", "/assets/spinner.gif" and "/images/spinner.gif"
What am I missing?

thansk!

Answer
loading.src = "/YOURAPPNAME/assets/spinner.gif";

Although I prefer to have that gif in a div a then only show/hide that div and don't mess with paths.

$("#spinner").hide();
$("#spinner").show();
Comments