How to animate images?

How do you organise the CSS/images files that come with a JS plugin?

  • Normally I start with a simple structure like this: /index.html /css/ /js/ /images/ ... And I will put all jQuery plugins inside /js/, like this: /js/PLUGIN_NAME/ Now, most of the time, these plugins do not come with the Javascript file only but also an additional CSS file and images. So you will have something like this: /js/PLUGIN_NAME/PLUGIN.min.js /js/PLUGIN_NAME/styles.css /js/PLUGIN_NAME/images/1.png /js/PLUGIN_NAME/images/2.png etc... I'd like to know what do you do with these (CSS and images) files. Do you just keep them inside /js/ or do you go and move them to the correct folder? For instance, all images should go to /images/ and all stylesheets to /css/. Or is there a better way to keep them better organised? Personally keeping them inside /js/ makes more sense to me as it's more maintainable. It will also save some times if you decide to remove a plugin. What do you think?

  • Answer:

    Actually I'm putting plugins in a plugin folder. If I have more then 3 plugins I create a sub-folder for each plugin. I put jQuery.js and/or other libraries in a lib folder. In the js folder I put only my JavaScript files.

Raanan Avidor at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.