good morning
i have a short question:
i implemented an ajax tooltip. for my plan, i have to pass parameters to the ajax request of the tooltip, but i dont find a nice solution for this problem
thats my tooltip
<a class="easyui-tooltip" data-options="position: 'right', content: $('<div></div>'),onUpdate: infoTooltipOnUpdate" href="#">
<img alt="info_icon.png" src="http://saleslink.local/backend/img/info_icon.png">
</a>
onupdate function:
function infoTooltipOnUpdate(content){
content.panel({
width: 300,
height: 'auto',
border: false,
href: ajaxUrl + '?PARAM1=123&PARAM2=456&PARAM3......'
});
}
the tooltip is in a grid. for each row in the grid, an tooltip-icon exists. so for each grid row other content should be shown.
to realize that, i have to pass parameters to the tooltip-request, but i dont find a nice solution
i solved the problem with an attribute in the tooltip:
<a class="easyui-tooltip" data-options="position: 'right', content: $('<div></div>'),onUpdate: infoTooltipOnUpdate" href="#" param1="123">
<img alt="info_icon.png" src="http://saleslink.local/backend/img/info_icon.png">
</a>
function infoTooltipOnUpdate(content){
var param1 = $(this).attr('param1');
content.panel({
width: 300,
height: 'auto',
border: false,
href: ajaxUrl + '?PARAM1=' + param1
});
}
does anyone know an better solution?
thx for help