views:

33

answers:

1

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...

+1  A: 

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.

ejel
@ejel i dont want to hide the div because it contains data i only want to hide anchor tags within it and show them only on hover...
Pandiya Chendur
@ejel i only want to hide the anchor tags... How to do that?
Pandiya Chendur
My bad. I changed the example to check and show/hide only the anchor element.
ejel