best practice for Jquery plugin implementation and resource locations

Posted by ptutt on Stack Overflow See other posts from Stack Overflow or by ptutt
Published on 2010-03-28T07:59:14Z Indexed on 2010/03/28 8:03 UTC
Read the original article Hit count: 137

Filed under:
|

This is probably a very basic question, but I seem to have issues plugging in jquery plug-ins. The issue seems to be around the location of the script, css and images and ensuring the css has the correct url to the images.

The standard plug-in has the following folder structure (eg : JPicker)

  • js
  • css
  • images

My project is asp.net mvc so I have the default:

  • scripts
  • images
  • content

So, I try to split the jquery plugin to the appropriate folders (not sure if this is the best way?). Then I try to correct the references to images (background urls) in the css. I believe the url is relative to the page that is implementing the css file, not the location of the css file itself.

Anyway, when I try the above, the plugins don't seem to work. I believe the issue lies with the images not being found. The jquery code runs without errors, so I assume that's not the problem.

Any help/advice much appreciated

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about css