开发者

qtip - distinct results on distinct table rows

I have table with few rows, after use hover mouse over row I want to display qtip ( http://craigsworks.com/projects/qtip/docs/#create ) tooltip. How can I refer to some row id in function, where I define displayed content:

$(document).ready(function() {
    $('.qtip').qtip({
           content:  $(this)  <-- this don't work
        });
});

I have tables with rows like this:

 <td class="qtip" id="pic-<?php echo $item->product_id; ?>">

I want to displ开发者_StackOverflow社区ay row id in tooltip. (for example pic-1232)


You can use $(this).attr('id') as the content of the qtip plugin. BTW it is not the row id but the cell id as you get the id of the td element.

@PKKid set the class on your tr element and it will work on the whole row.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜