is there a way to combine in one expressinon for example:
$('.class').click()if( foo == 'bar')
I mean,
when .class item is clicked and var is true, do something
something that puts this toggether
$('.class').click(function(){
if(foo == 'bar'){
//do something
}
})
depending of your test case you can try to use jquery selector;
for example:
if
.classis an</a>tag you can have like this:if it is an
<input/>something like thisobviously
fooshould be aglobal