Css transforms on element attributes only

17 views
Skip to first unread message

alexmnyc

unread,
May 20, 2013, 11:49:21 PM5/20/13
to lif...@googlegroups.com
Hi guys,
 
I can't seem to find a generic solution to do a CssSelector transform on an attribute only, is this possible?
 
"button *+" #>
        hidden(process)
 
"#undelete" #>
       if (someCond) Shtml.attr("style","display:none;") else Shtml.attr("style","display:block;")
 
 
The closest I found was using Jq:
 
 
    Jq("button") ~> JqAttr("style", "display:none;")
 
But I'm not sure how to wire in a JsCmd in Selector transform upon initial rendering.
 

Diego Medina

unread,
May 21, 2013, 12:00:27 AM5/21/13
to Lift
"#my-input-field [style]" #> "nice-color-from-css-file"

and

"#my-input-field [hidden]" #> "hidden"


is that what you mean?


 

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://fmpwizard.telegr.am

a.mik...@gmail.com

unread,
May 21, 2013, 12:36:15 AM5/21/13
to lif...@googlegroups.com
Thank you, Diego!

Diego Medina

unread,
May 21, 2013, 12:42:02 AM5/21/13
to Lift
glad it helped! You may want to read this chapter


I have found it very helpful to learn the diff things you can do with css selectors


On Tue, May 21, 2013 at 12:36 AM, <a.mik...@gmail.com> wrote:
Thank you, Diego!

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

alexmnyc

unread,
May 21, 2013, 1:35:53 AM5/21/13
to lif...@googlegroups.com
This is a nice quick summary, thanks again!
Reply all
Reply to author
Forward
0 new messages