简体   繁体   English

使用JQuery cluetip锚传递参数

[英]passing parameter with JQuery cluetip anchor

I am using JQuery for the first time and need help. 我是第一次使用JQuery,需要帮助。

When i click on a anchor tag it calls a html div and shows up a popup(JqueryCluetip Plugin) 当我单击一个锚标记时,它将调用html div并显示一个弹出窗口(JqueryCluetip插件)

<a class="tips" href="#kt" rel="#kt" title="Kate Thompson">more info...</a>

I have this cluetip function: 我有这个提示功能:

$(document).ready(function() {
$('a.tips').cluetip({
    cluetipClass: 'rounded',
    dropShadow: false,
    showtitle: false,
    positionBy: 'mouse',
    local: true,
    hideLocal: false,
    sticky: true,
    width: 410,
    closeText: 'Close'
});   

}); });

Now my question is i want to pass parameter called userid to the anchor tag so that the popup shows differnet data based on input paramter. 现在我的问题是我想将名为userid的参数传递给锚标记,以便弹出窗口根据输入参数显示differnet数据。 (Basically i have to pass that id to a backing bean and get the corresponding user details for that id and show it up in the popup.) Please let me know how can i perform this task. (基本上,我必须将该ID传递给备用Bean,并获取该ID的相应用户详细信息,然后在弹出窗口中显示它。)请让我知道如何执行此任务。

您可以在名为“ userid”的元素上添加任意属性,并在需要时将其从锚对象中删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM