Mootools 1.3如何在“注入”函数中获取if语句?
|
我需要以下if代码中的if语句,但如果存在,则无效。有什么办法可以做别的事情吗?
var ele = new Element(\'li\').adopt(
new Element(\'span.title\', {text:row.title}),
new Element(\'span.subtitle\').adopt(
// Need this to work, but its invalid where it is atm
if(row.subtitle = 1)
{
new Element(\'img\', {src:\'images/subTitle.png\'})
}
),
new Element(\'span.bold\', {text:row.bold}),
);
ele.iject(...
没有找到相关结果
已邀请:
2 个回复
捻盒愧杯
暑袜眠退