开发者

Twitter like row hover reply,delete links in jquery

Is there any plugin or how to display twitter like row hover reply,delete links in jquery.... Any suggestion....

EDIT:

I am iterating my json data via jquery,

$.each(data.Results, function() {
                    divs += '<div class="resultsdiv">
                 <a href=Clients/Show/' + this.ClientId + '/>Details</div>';
                });

What it does开发者_运维问答 my details link is shown in all rows... I want to show like twitter on row hover i wnat to show details link...


You could initially hide your details links, and only shows it on mouse hover by hooking an event handler to hover event.

So based on your code snippet, you would probably do something like this:

$.each(data.Results, function() {
    $(divs).append('<div class="resultsdiv" style="display:none">
            <a href=Clients/Show/' + this.ClientId + '/>Details</div>').hover(function() {
        var $anchor = $(this).find('a');
        if $anchor.is(':hidden') {
            $anchor.show();
        } else {
            $anchor.hide();
        }
    });
});

You can also use the other variant of hover where you provide two callback functions, one for mouse moving in and the other for mouse moving out. That way you can explicitly show/hide the anchor based on the corresponding event.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜