Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference Javascript Library in another Javascript Library

Status
Not open for further replies.

Peppi

Programmer
Apr 9, 2001
205
CA
Hi,

How can I reference a Javascript library in another Javascript library that I am building?

Thanks.
 
You don't. You simply use whichever functions you need from the other library. When you are putting together the page the libraries are going to be used in, simply make sure the libraries that are required for your library are included in the page.

For instance if you your library which we will call libPeppi.js requires something from another library say libX.js just include both in the page, and whatever is in libX will be available to libPeppi.

Code:
<script src="libeppi.js" type="text/javascript"></script>
<script src="libX.js" type="text/javascript"></script>



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top