【问题标题】:jssor thumb custom classjssor thumb 自定义类
【发布时间】:2014-04-09 14:36:11
【问题描述】:

我正在拼命地更改我的 jssor 滑块中缩略图的类名。

我有以下代码:

<div><a u="image" href="[+ic.property.Href+]" title="[+ic.resources.exclusive+]    [+ic.property.type+] [+ic.resources.in+] [+ic.property.area+]">
<img u="image" src="[+ic.GetImageUrl+]" />
<img u="thumb" src="[+ic.GetImageUrl+]" class="[+ic.property.imgClass+]" />
<div class="tnt_caption_container">
<div class="tnt_caption_content">
[+ic.propertyTitle+] · [+ic.property.price+]
</div>
</a></div>
</div>

变量[+ic.property.imgClass+]可以为空也可以不... 我要归档的是将一些图像与另一个 .png(新的、专有的等)重叠,只要它们满足某些条件。

如果我在 之前添加一个 div 元素,加载页面时它根本就不存在。并且都有 class=""... 即使我删除了我的代码,类名仍然是空的。所以我假设 js 在创建滑块时会清空类名,但我不知道这是在哪里发生的。

感谢您的关注。

【问题讨论】:

    标签: jquery slider jssor


    【解决方案1】:

    使用以下格式定义带有自定义类的缩略图,

    <div u="thumb">
        <img src="[+ic.GetImageUrl+]" class="[+ic.property.imgClass+]" />
    </div>
    

    【讨论】:

    • 它没有用 :( 我已经添加了更多关于我尝试过的细节,希望能帮助你帮助我!
    【解决方案2】:
    <div u="thumb">
        <img src="[+ic.GetImageUrl+]" class="myClass" />
    </div>
    

    请注意,您的课程仅适用于元素

    顺便说一句,请检查您的代码 'class="[+ic.property.imgClass+]"',它会生成 'class=""'。

    【讨论】:

    • 你的意思是变量[+ic.property.imgClass+]是空的吗?我可以说不是。正如我所说,即使我写了 class="test",类稍后也会为空。无论如何,我怎样才能实现用 png 覆盖所有缩略图?这样就够了。
    • 知道为什么它不起作用吗?您可以在此处查看正在运行的滑块:satorreproperties.com
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多