开发者

jQuery Selector: show onclick

I'm having a bit of trouble getting a certain div to show onclick. Any takers?

HTML

<div style="float:left;width:40px;">
<span class="productControl" style="position:relative;">
    <div class="productMenuHolder" style="display:none;">
    <ul class="productMenuList">
        <开发者_高级运维;li class="productMenuItem">Add to Collection</li>
        <li class="productMenuItem">Share</li>
    </ul>
    </div>
</span>
</div>

jQuery

$("span.productControl").click(function(){
    $(this).next().show();
});

The productMenuHolder doesn't seem to show up!


$(this).find('.productMenuHolder').show()

I suggest you look a bit closer at the markup.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜