开发者

JQuery JQDock Label Always Visible

I have looked around and cannot seem to find an answer to this trivial problem. I have created a fisheye menu using JQDock however I am unsure on how to display the label for each icon initially.

At the minute I can only dispaly and manipulate the label when the mouse is hovered over an icon and I would like to initially show the label of the icon and then maybe chang开发者_开发技巧e the css of it when the icon is being hovered over

Thanks for any responses


Using the example shown on - http://www.wizzud.com/jqDock/

If you use this code you will get the labels shown:

$("#jqDock0").find(".jqDockLabel").each(function(){
   $(this).attr('style', 'display:block');
});

Update (@15:20 GMT):

After using your markup i have the following:

HTML:

<div id='page'>
    <div id='menu'>
        <img src='SubMenu_item_1_a.png' title="Link 1" alt='SubMenu_item_1_b.png' />
        <img src='SubMenu_item_1_a.png' title="Link 2" alt='SubMenu_item_1_b.png' />
        <img src='SubMenu_item_1_a.png' title="Link 3" alt='SubMenu_item_1_b.png' />
        <img src='SubMenu_item_1_a.png' title="Link 4" alt='SubMenu_item_1_b.png' />
        <img src='SubMenu_item_1_a.png' title="Link 5" alt='SubMenu_item_1_b.png' />
    </div>
</div>

jQuery:

$("#menu").find("img").each(function(){
    $("<span>"+$(this).attr('title')+"</span>").insertAfter($(this))
});

Check it in action here - http://jsfiddle.net/YZ4CW/

Update (@15:53 GMT):

jsfiddle.net/vwbfP (not sure if i inserted it correctly but its all there) – Kevin Grey 18 mins ago

I've updated your example, which is now working. http://jsfiddle.net/vwbfP/1/


http://www.wizzud.com/jqDock/index.php?dt=0&pg=examples#permanent_labels (images within links, requires v1.7+) or http://www.wizzud.com/jqDock/index.php?dt=0&pg=examples#permanent_labels2 (images only, requires v1.8) ?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜