This code does more or less what i wanted. And it’s natively supported. It’s called conditional attributes in docs.
You can find more information about it in attribute section.
Only works with latest version of jade.
//- Suppose object passed is this
- var selected='about';
li(class={selected:selected=="home"}) Home
li(class={selected:selected=="blog"}) Blog
li(class={selected:selected=="about"}) About
..Will result in this:
<li>Home</li>
<li>Blog</li>
<li class="selected">About</li>
solved is there jade plugin that would allow manipulation using jquery styled syntax