sorry, correction, first i had to wrap the jquery function in another
function. and although this "worked", i think because of the looping
or something, the second function was executed before all the jquery
stuff finished

( function(){
      $('div[class="rating"]').livequery(function(){
        var $this = $(this);
        var opts = function(){
                g.ratingOpts.self = $this;
                g.ratingOpts.curvalue = parseInt($this.attr("rate"));
                return g.ratingOpts;
        }();
        $this.rating(opts);
      })
}).etc....

On Jan 22, 12:55 pm, chrismarx <[EMAIL PROTECTED]> wrote:
> well, yeah it would be, if i were smart enough to figure out how to
> actually use in the context of jquery chained functions. the above
> example is what i want it to do. the closest i got was this:
>
> ( $('div[class="rating"]').livequery(function(){
>         var $this = $(this);
>         var opts = function(){
>                 g.ratingOpts.self = $this;
>                 g.ratingOpts.curvalue = parseInt($this.attr("rate"));
>                 return g.ratingOpts;
>         }();
>         $this.rating(opts);
>
> })).andThen(function(){
>
>     alert("I'm called after livequery has looped through all the div's
> with class rating");
>
> })();
>
> but that me, because the second function still executes before the all
> the jquery finishes. with simple functions this works fine, but i dont
> understand wel enough how jquery handles the multiple selectors, nor
> how live query executes in this context either. i think a lot of
> people out there could really benefit from a plugin that does this-
>
> On Jan 22, 9:07 am, h0tzen <[EMAIL PROTECTED]> wrote:
>
> > this is pretty smart.
> > why not just use prototyping? thats what jscript is all about and
> > personally i think, its *the* best idea to add that feature.

Reply via email to