On Sep 11, 10:38 pm, Josh Bush <[EMAIL PROTECTED]> wrote:
> You could add lt in at the top of your plugin if it's missing.
> Something like:
>
> if(!jQuery.fn.lt){
>    jQuery.fn.lt=function(n){
>       return this.slice(0,n);
>    }
>
> }

i don't feel right about "adjusting" the global jQuery API for the
user, so i did the following local kludge (which stays hidden inside
plugin-only objects, rather than modifying the shared jQuery object):

        var wrappers = jQuery('> div',this);
        var contents = jQuery('div:last',wrappers);
        var heads = jQuery('div:first',wrappers);
        if( ! heads.lt ) { // accommodate jQuery 1.2 incompatibility...
                heads.lt = function(index) { return heads.slice(0,index); };
                heads.gt = function(index) { return heads.slice(index+1); };
        }


Reply via email to