tags:

views:

194

answers:

2
<div spry:region="ds1" spry:repeatchildren="ds1">
  <b spry:if=" '{title}'!='' ">
    <!-- this is the first if --> 
    <a href="#"  spry:if=" '{author}'!='' ">{author}
      <!-- this is the second if -->
    </a>
  </b>
</div>



I wonder if there is any method as simple as

if(x==y && i>j)  

in

<b>spry</b> 

region. I can't find any information in spry docs (labs.adobe.com/technologies/spry/)

+1  A: 

The syntax inside the spry:if attribute is Javascript, so you can use &&:

<b spry:if="'{title}' != '' && '{author}' != ''">
<!-- ... -->
</b>
Porges
A: 

also you can call a function instead

spry:if="myFunc();"

and in your function return Boolean value as result

function myfunc()
{
//do somethings ;
if(...)
return true;
else
return false;
}
loali