Hi I'm using a jquery plugin called backstretch. In my included js file called "main.js" I have this snippet relevant to that 3rd party module:
$("body").backstretch([ "assets/images/bg1.jpg", "assets/images/bg2.jpg", "assets/images/bg3.jpg" ], {duration: 5000, fade: 1000}); My main.js file lives in src/main/webapp/assets/js/main.js My default component Layout.java file has this decoration/annotation: @Import(stylesheet = {"context:assets/css/animate.css", "context:assets/css/font-awesome.css", "context:assets/css/owl.carousel.css", "context:assets/css/owl.theme.css", "context:assets/css/magnific-popup.css", "context:assets/css/style.css"}, library = {"context:assets/js/jquery.easing.1.3.js", "context:assets/js/wow.js", "context:assets/js/jquery.backstretch.min.js", "context:assets/js/owl.carousel.js", "context:assets/js/jquery.magnific-popup.js", "context:assets/js/jquery.ui.totop.js", "context:assets/js/main.js"}) public class Layout { It loads no problems with what I'm doing - might be a bit simplified but it works :) Chris On Tue, Sep 23, 2014 at 8:31 AM, akshay <akshayestat...@gmail.com> wrote: > Hi, > > My js file is a colorpicker and it uses these images to display the color > options. Being a thirdparty component it, should just work fine without > any changes. But that doesnt seems to be the case , and no image is > displayed for the picker, since the image is not loaded/resource is not > found . > > > So, I try to find a solution where I can embed my images to be loaded along > with the js file using this file from tapestry core module. Being very new > to javascript , I might be wrong. :) > > > Regards > Akshay > > On Tue, Sep 23, 2014 at 12:16 AM, Thiago H de Paula Figueiredo < > thiag...@gmail.com> wrote: > > > On Mon, 22 Sep 2014 19:11:59 -0300, akshay <akshayestat...@gmail.com> > > wrote: > > > > Hi, > >> > > > > Hi! > > > > Thanks for your concern!! > >> > > > > ;) > > > > Whereas when I remove "dependsOn(img.getFile()))" code snippet, it loads > >> fine, but without the image( which is required by the js file to work > >> functionally). > >> > >> I am just trying to find out a way in which I can load the images > related > >> to the js file using the above configuration, whether its feasible or > not > >> > > > > Are you trying to embed the image as part of a JavaScript stack? This > > isn't possible because it doesn't make sense. > > > > How exactly your JavaScript code uses the image? Its URL being used in > the > > HTML the JS code manipulates? If yes, you don't include the image inside > > the JavaScript stack. You just pass to the JS code the image URL. > > > > > > -- > > Thiago H. de Paula Figueiredo > > Tapestry, Java and Hibernate consultant and developer > > http://machina.com.br > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > -- > Cheers!! > Akshay >