我正在寻找隐藏这些页面上的图像容器的依据,如果上传到该特定事件的实际图像,或者占位符图像位于容器内部。区分这两幅图像的唯一方法就是图像的路径,以及alt标签。我显然希望隐藏图像容器容器的占位符图像。 (th_noimage.jpg是占位符图片)根据该div内的内容显示/隐藏div
http://www.salvatorechiarelli.com/List/February
<div class="productListImageContainer">
<a id="MainContent_controlProductsList1_lvItems_ctrl0_lnkImage_0" href="/View/Thursday-February-14th-2013-7P-M">
<img id="MainContent_controlProductsList1_lvItems_ctrl0_produtImage_0" alt="Thursday, February 14th, 2013 @ 7P.M." src="/ProductImages/112229/th_noimage.jpg">
</a>
</div>
<div class="productListImageContainer">
<a id="MainContent_controlProductsList1_lvItems_ctrl0_lnkImage_1" href="/View/Sunday-February-17th-2013-3P-M">
<img id="MainContent_controlProductsList1_lvItems_ctrl0_produtImage_1" alt="Sunday, February 17th, 2013 @ 3P.M." src="/ProductImages/112229/th_be4a17_feb_17_13.png">
</a>
</div>
基本上是一个剧本,说隐藏productListImageContainer如果它包含th_noimage.jpg。我希望我是一名程序员,但它完全凌驾于我的头上。
这是一个电子商务CMS部分的网站,我操作为我的客户事件列表工作,顺便说一句。感谢您提供的任何帮助!
你这个页面上使用jQuery的占位符? – 2013-02-08 22:29:16
@nathanhayfield试图用google搜索几个stackoverflow的例子,但没有太多的运气。我认为这很简单,我不必展示这些例子。 – 2013-02-08 22:41:05
@JeromyFrench当然。但似乎无法弄清楚为什么我无法让脚本为网站的其他部分工作。 – 2013-02-08 22:41:38