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 6538929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:47:43+00:00 2026-05-25T10:47:43+00:00

I am developing a jQuery plugin which needs to load other files relative to

  • 0

I am developing a jQuery plugin which needs to load other files relative to the same directory in which my ‘plugin.js’ file is located. Is there a way to do this?

  • 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-25T10:47:43+00:00Added an answer on May 25, 2026 at 10:47 am

    One way to achieve this is to loop through all $('script') elements, identify the one that represents your plugin inclusion, and extract the path. Of course this might not be reliable as the consumer of your plugin might have renamed your .js file.

    Actually what you have is a pretty weird requirement. Can’t you simply describe in the documentation of the plugin which scripts need to be included or simply pass the relative url as argument to your plugin? For example many jQuery plugins take a url as parameter so that the consumer can specify where did he put other required scripts. This allows for the consumer more flexibility on the location of those external scripts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m developing a site heavily based on jQuery and involving WordPress. Is there any
I am currently developing a site for a client which uses the JQuery cycle
I stumbled upon an issue with event namespacing while developing a jQuery plugin. here
I am developing my own lightbox kind of jquery plugin. Everything works but I
I am developing an autocomplete jquery plugin and I would like to optimise it
I am currently developing a site that users the jQuery superfish plugin to construct
I found an anchor plugin for jQuery, and its demo site is at http://www.position-relative.net/creation/anchor/
I am developing a model box jQuery plugin, and I need to know how
Is there any way to check if a particular plugin is available? Imagine that
When developing for browsers FF3 and IE6/7 with jQuery, are there any compatibility issues

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.