Dynamically specifying class of an element?

3 views
Skip to first unread message

Yang Zhang

unread,
Sep 14, 2011, 7:20:55 PM9/14/11
to sca...@googlegroups.com
I'm probably missing something obvious. I tried:

li(class={"foo"})

But the generated code is just:

<li class>

Only li.foo works, but that's static. I need to dynamically generate
the class string.

Thanks in advance for any answers.

--
Yang Zhang
http://yz.mit.edu/

Yang Zhang

unread,
Sep 14, 2011, 7:56:42 PM9/14/11
to sca...@googlegroups.com
Oops, this actually works fine - I had a piece of JS that was removing
the classes.
Reply all
Reply to author
Forward
0 new messages