in jquery you can find $.getScript() function... wich is part of ajax way to 
retrieve javascript on the fly... so the script is not needed to be put on the 
page but loaded asynchronously before or after the page loaded depend on when u 
need the script... 

Best Regards

Darwin Liem

--- On Wed, 11/11/09, Wouter <vanree...@gmail.com> wrote:

From: Wouter <vanree...@gmail.com>
Subject: [jQuery] parameters to jquery’s .load()
To: "jQuery (English)" <jquery-en@googlegroups.com>
Date: Wednesday, November 11, 2009, 4:37 AM

hello,

I have to files ans the first one index.html I use all the
javascripts. As you can see in my script i like to load
"aanmelden.html". In this page U like to uise a callander. How can I
use the calanderfunction without putting the javascript directly into
aanmelden.html

$(document).ready(function() {
    $("img[rel]").overlay(function(){
          $("#aanmelden_page").load("pages/
aanmelden.html",'#startDatepicker,#endDatepicker');
           $('#startDatepicker,#endDatepicker').datepick({beforeShow:
customRange,
                showOn: 'both', buttonImageOnly: true, buttonImage: 'images/
calendar.gif'});
    });



    function customRange(input) {
        return {minDate: (input.id == 'endDatepicker' ?
            $('#startDatepicker').datepick('getDate') : null),
            maxDate: (input.id == 'startDatepicker' ?
            $('#endDatepicker').datepick('getDate') : null)};
    }

etc..



      

Reply via email to