与qTip动态内容的动态参数 [英] Dynamic parameters for dynamic contents with qTip
本文介绍了与qTip动态内容的动态参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过与qTip动态参数,但它失败。 my_ajax_controller.php只显示变量的类型,但非q。
I want to pass a dynamic parameter with qTip, but it fails. my_ajax_controller.php just displays the variable type, but not q.
$('a.menu_help').qtip({
content: {
url:'my_ajax_controller.php',
data: 'type=help_menu&q='+$(this).attr('id'),
method: 'get'
},
show: 'mouseover',
hide: 'mouseout'
});
不过,Q作品的静态值:
However, a static value of q works:
$('a.menu_help').qtip({
content: {
url:'my_ajax_controller.php',
data: 'type=help_menu&q=toto',
method: 'get'
},
show: 'mouseover',
hide: 'mouseout'
});
请问有没有办法通过一个动态值的参数数据?
Is there no way to pass a dynamic value to the parameter data ?
在此先感谢!
弗洛朗
推荐答案
它应该工作,但只是尝试,看看你传递的ID,或者传递数据的收集是这样的:
It should work, but just try to see what you pass as ID, or pass data as collection something like:
data : {'type':'help_menu', 'q':id}
或
$('a.menu_help').qtip({
var id = $(this).attr('id');
alert(id);
content: {
url:'my_ajax_controller.php',
data: 'type=help_menu&q='+ id,
method: 'get'
},
show: 'mouseover',
hide: 'mouseout'
});
这篇关于与qTip动态内容的动态参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文