I think I might be missing the point here, but ... if you have one js file
with all your commonly used 'jquery stuff' in it, why do you need to load
anything else, except on special occasions?

My idea of one js file of common code means something like...

<start of js file>
/*jquery v1.2 PACK */
..........code
/*jquery.dimensions.js v1.0 MIN */
..........code
/*jquery.form.js v1.0 MIN */
..........code
/*jquery-calendar.js v? */
..........code
/*validationAide/stringaide.js v? */
..........code
/*validationAide/validationAide.js v? */
..........code
/* my common code */
jQuery(function($){
  ..........code
});
<end of js file>

If I need to have additional plugins on certain pages then I <script
src...></script> them into the head section (after my common js file) as
normal. Or I can script in more jQuery(function($){....}); code as needed.

Why add more code just to handle a line of code, when a line of HTML is all
that's needed?

Have a missed the point entirely?
Is there some hidden, implicit meaning behind your request, like a plugin
dependency database or something?


bigbird023 wrote:
> 
> 
> I have a question since some plugins are relying on other plugins for
> functionality.
> 
> My Question might have already been solved, but i don't see it in the
> documentation.
> 
> I basically would like to create a js file that has all my commonly
> used jQuery stuff in it, therefore, needing a way to import plugins
> into the DOM before the "ready" event fires.
> 
> I am requesting a function, for example "importJS", will load the
> javascript file into the head of the document, and force the ready
> event to wait until these additional files are loaded.
> 
> 
> 
> Example JS file
> /* INCLUDE JQUERY REQUIREMENTS FOR BASEINTERFACE.JS */
> $importJS('/js/jQuery/plugins/calendar/jquery-calendar.js');
> $importJS('/js/jQuery/plugins/validationAide/stringaide.js');
> $importJS('/js/jQuery/plugins/validationAide/validationAide.js');
> 
> $(document).ready(function(){
> 
> /* DEFINE CALENDAR FIELDS */
>       $(".fieldControlDate").calendar({autoPopUp: 'button',
> buttonImageOnly: true, buttonImage: '/images/calendar_mini.gif',
> buttonText: 'Calendar', dateFormat: 'MDY/'});
> 
>       /* DEFINE FORM VALIDATION */
>       $("form").validationAideEnable(
>               null,
>               {showInlineMessages:true, showSummary:false,
> inlineMessageCssClass:"fieldvaluerequired-message",
> fieldErrorCssClass:"fieldvaluerequired"},
>               function (fieldValue, fieldObj){
>                       $
> ("#"+fieldObj.id).parents(".fieldcontainer").removeClass("fieldcontainerrequired");
>               },
>               function (fieldValue, fieldObj, success){
>                       if (!success) {
>                               $
> ("#"+fieldObj.id).parents(".fieldcontainer").addClass("fieldcontainerrequired");
>                       }
>               }
>       );
> 
> });
> 
> 
> thoughts????
> thanks.......
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/plugin-packages-tf4436653s15494.html#a12659270
Sent from the JQuery mailing list archive at Nabble.com.

Reply via email to