$('.MyElement').each(function(i, element){
resourceLinks= $(this).find($('.animation')).attr('src'); //if there is an .animation class element, get the giffrom it
我有一个函数来检查img标签是否在一个带有类"colorbox“的图形元素中,如果是的话,可以在一些元素中添加一些额外的样式。但是,即使在彩色框中没有图像,函数仍然运行,我也不知道为什么。我的jQuery看起来像这样 if ($(".colorbox").has("img")) { }这是彩色盒子,很明显没有img元素.
这是我的jquery函数,传递的参数是php json_encoded数据, var str=JSON.stringify>); <span style="font-family: Times New Roman; font-size: 12pt;"><img style=83 height=44 src="image045.gif"></sp