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
Related Q & A:
- How to save ONLY the CSS changes of Styles panel of Chrome Developer Tools?Best solution by Stack Overflow
- How to fire a function before and after automatically in a jquery plugin?Best solution by catchmyfame.com
- How do I change HTML content to be a JS variable?Best solution by ehow.com
- How to change links in CSS?Best solution by Stack Overflow
- How to download files and pics on a blank DVD discs?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.