方法描述
默认显示一个,鼠标移动到节点上时增加当前样式,同时去除其兄弟节点的当前样式
应用场景
主要应用于190布局宽度下,因宽度有限,默认只显示商品标题,当鼠标移动到标题上时显示更多的商品信息。
方法参数
名称 值 类型 描述
调用语句
<div class="j-module" module-function="changeClass" module-param="{参数一:值,参数二:值,...>模板代码</div>
方法调用 支持传入节点、当前样式名、默认当前节点
参数
节点 node string 如:{node:’li’}
当前样式 defaultClass string 如{defaultClass:’jCurrent’}
默认节点 defaultShow number 如{defaultShow:0}

<div class="j-module" module-function="changeClass" module-param="{node:'li', defaultClass:'jCurrent'}" >
    <ul>
        #set($i=1)
        #foreach($!goods in $!goodsRecList)
        <li>
            <div class="jItem">
                <div class="jPic">
                    <a href="$!jshopProduct.getBuyUrl($!goods.goodsId)" target="_blank"><img src="$!jshopCommon.getImage($!goods.imageurl,5)" alt="$!goods.wname" height="50" width="50" /></a>
                </div>
                <div class="jGoodsInfo">
                    <div class="jDesc" title="$!goods.wname">
                        <a href="$!jshopProduct.getBuyUrl($!goods.goodsId)" target="_blank">$!goods.wname</a>
                        <span class="jSlogan">$!goods.advertWord</span>
                    </div>
                    <div class="jPrice">
                        <span class="jRmb">&yen;</span>
                         $!jshopPrice.getJdPrice($!goods.goodsId)
                    </div>
                </div>
                <div class="jIcon">$i</div>
            </div>
        </li>
        #set($i=$i+1)
        #end
    </ul>
</div>
.userjGoodsRecommend .mt{}
.userjGoodsRecommend .mc{}
.userjGoodsRecommend .mb{display:none;}
.userjGoodsRecommend .mc ul{width:100%;}
.userjGoodsRecommend li{overflow:hidden; float:left; width:100%;}
.userjGoodsRecommend .jItem{width:100%; border-top:solid 1px #EFEFEF; padding:8px 0; position:relative;}
.userjGoodsRecommend .jIcon{padding-left:5px; font-size:14px; font-weight:bold; color:#F00; position:absolute; left:0; top:8px; *top:6px; z-index:1;}
.userjGoodsRecommend .jPic{overflow:hidden; float:left; *display:inline; margin-left:25px; display:none;}
.userjGoodsRecommend .jPic img{vertical-align:top; display:block;}
.userjGoodsRecommend .jPic a{}
.userjGoodsRecommend .jGoodsInfo{padding:0 5px;}
.userjGoodsRecommend .jDesc{overflow:hidden; height:16px; padding-right:5px; margin-left:25px; word-wrap:break-word; word-break:break-all;}
.userjGoodsRecommend .jDesc a{}
.userjGoodsRecommend .jDesc a:hover{text-decoration:underline;}
.userjGoodsRecommend .jSlogan{}
.userjGoodsRecommend .jPrice{display:none; color:#ff0000; font-weight:bold;}
.userjGoodsRecommend .jCurrent .jPic{display:inline;}
.userjGoodsRecommend .jCurrent .jGoodsInfo{padding:0 5px; margin-left:75px;}
.userjGoodsRecommend .jCurrent .jDesc{height:32px; line-height:1.3; overflow:hidden; padding:0; margin:0 0 3px 0;}
.userjGoodsRecommend .jCurrent .jPrice{display:block;}
.userjGoodsRecommend .jPrice .jRmb, .userjGoodsRecommend .jPrice .jdNum{color:#ff0000;}
最后编辑: admin  文档更新时间: 2020-03-24 09:32   作者:admin