Well the compiler is trying to convert your JsRaw into a NodeSeq, because 
that's what happens to anything inside an xml literal. It probably uses 
toString.
I can't tell you how to do it correctly because I'm not familiar with Lift's 
javascript functionality.


-------------------------------------
glenn<[email protected]> wrote:


Hi, Ross,

Unfornately, all of these just result in:

function() {jQuery('#'+"item-save").empty().after("<div>this.id was
toggled</div>");}

They simply treat this.id as part of the passed in NodeSeq,
"<div>this.id was toggled</div>". I need it
to output <div>this.id + "was toggled"</div>.

Glenn




On Sep 29, 1:46 pm, Ross Mellgren <[email protected]> wrote:
> Try JsVar("this", "id") or JsRaw("this.id")
>
> -Ross
>
> On Sep 29, 2009, at 4:22 PM, glenn wrote:
>
>
>
> > I'd like to converting the following
>
> > JsRaw("""function() $('#item-save').html(this.id + ' was
> > toggled')""")
>
> > into something more object-oriented, using JQuery support functions in
> > Lift.
>
> > I've tried various combiniations, including this
>
> > AnonFunc(JqId("item-save") >> JqEmptyAfter(<div>{JsRaw(this.id)} was
> > toggled</div>))
>
> > but nothing seems to work. It just treats this.id as ordinary text,
> > not as a Javascript variable.
>
> > Any ideas would be appreciated.
>
> > Glenn


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to