Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 320775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:47:05+00:00 2026-05-12T08:47:05+00:00

jQuery plugins often have dependencies on external files: jQuery library, style sheets (CSS), images,

  • 0

jQuery plugins often have dependencies on external files: jQuery library, style sheets (CSS), images, other plugins, etc. What are the guidelines for using (and writing) jQuery plugins that would address the placement of the dependencies? In the other words, where should the required files go: under main app folders (Img, Css, JS, or whatever folders you use), under plugin folder (e.g. Plugins/MyPlugin/Img, Plugins/MyPlugin/Css, etc), or something else?

After including several plugins to the project, I’m concerned that other project members will have a hard time figuring out which dependencies are required and which files should go where.

What worked and did not work for you?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:47:05+00:00Added an answer on May 12, 2026 at 8:47 am

    Personally, when I build a plugin, I try to make it dependent as little as possible on other resources as to avoid this issue. Sometimes you can’t avoid using external stylesheets in which case I’ve always put them with my other CSS files even if they are originally included in the same folder as the plugins. This avoids any ambiguity when trying to decide which stylesheets should go where etc. You will manually have to include them anyways. If the plugin has any dependencies, they go in the JS folder, organized in a similar manner as the other plugins. Images, in this case, would then go with all of the other images.

    When building a plugin, you can make it more flexible by allowing the user to define the classes that are applied to certain objects, or let the user define the structure of what the plugin will manipulate. All of this can be done while giving it a set of good defaults to follow while relying as little as possible on external resources.

    As to whether best practices have been defined for these situations, I have not found any yet. I have only found the plugin authoring guidelines on the jQuery site: http://docs.jquery.com/Plugins/Authoring.

    EDIT:

    As to clarify about plugin dependency organization:

    When say you have jquery.x.js and jquery.y.js. They both depend on jquery.z.js. I have always put jquery.z.js in the same folder as jquery.x.js and jquery.y.js. This avoids duplication and any confusion related to breaking the organizational convention. So:

    • ./jquery.x.js
    • ./jquery.y.js
    • ./jquery.z.js

    I normally organize my folders as such:

    • ./js/jquery-x.x.x.js
    • ./js/plugins/jquery.x.js
    • ./js/plugins/jquery.y.js
    • ./js/plugins/jquery.z.js
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 219k
  • Answers 219k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The app is trying to treat your UIViewController like a… May 12, 2026 at 11:51 pm
  • Editorial Team
    Editorial Team added an answer Turns out I wasn't calling set_facebook_session - doh! May 12, 2026 at 11:51 pm
  • Editorial Team
    Editorial Team added an answer You could also use a different delimiter for search parameters,… May 12, 2026 at 11:51 pm

Related Questions

EDIT: OK, I believe the following solutions are valid: Use the jQuery AOP plugin.
Background I have two select form fields chained together: duration and frequency. When the
I'm working on a mvc application that uses jquery to implement dynamically loading page
While creating a JQuery plugin that required image dimensions, I discovered that webkit browsers

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.