On Mon, May 11, 2009 at 8:19 AM, Magnus Alvestad
<[email protected]>wrote:
>
> To elaborate, I added a $(document).ready function to handle this.
>
> However!
>
> Some other pages have ajax functionality. When they update html in the
> page, this html (and the page) will not be 'reprocessed' by JQuery.
> Can I handle this in a generic manner?
Sure... when you update with Ajax, you're always sending JavaScript, e.g.,
SetHtml(id, <b>new stuff</b>)... so you could do something like:
SetHtml(id, <b>new stuff</b>) & Raw(""" $('.striped
tr:nth-child(odd)').css('background-color','#DDDDDD');""")
>
>
> -Magnus
>
> On May 11, 5:09 pm, Magnus Alvestad <[email protected]> wrote:
> > Ah! Based on Viktors suggestions and some more info at:
> >
> > http://15daysofjquery.com/examples/zebra/
> >
> > I was able to write this in a couple of lines of JQuery!
> >
> > -Magnus
>
> >
>
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---