如何在锚标记的title属性上呈现DIV内容 [英] How to render DIV content on title attribute of anchor tag

查看:77
本文介绍了如何在锚标记的title属性上呈现DIV内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在使用ASP.NET MVC4.0。

在我看来(cshtml)我有一个锚标记。当我将鼠标悬停在锚标签上时,我想显示一个DIV标记。



Hi All,

I am working on ASP.NET MVC4.0.
In my view(cshtml) I have a anchor tag. when i mouse over on anchor tag i want to display a DIV conent.

<a href="#"  id="lnktest">Test</a>





我的Div内容





My Div content

<div id="Ratinggrd">
    <table cellpadding="0" cellspacing="0">
        <colgroup>
            <col width="10%" />
            <col width="10%" />
        </colgroup>
        <tbody>
            @if (Model != null)
            {
                for (int count = 0; count < Model.Count; count++)

                { 

                <tr class="@(count % 2 == 0 ? "even" : "odd")" >
                    <td class="even">
                        <span>@Model[count].ABC</span>
                    </td>
                    <td class="odd">
                        <span>@Model[count].XYZ</span>
                    </td>
                </tr>
                }
            }
                   </tbody>
    </table>
</div>





请帮助!!



Please Help!!

推荐答案

你可以使用JQUERY动态设置Title

http://jqueryui.com/tooltip/#custom-content [ ^ ]
you can set Title dynamically using JQUERY
http://jqueryui.com/tooltip/#custom-content[^]


这篇关于如何在锚标记的title属性上呈现DIV内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆