weixin_33726943 2015-10-26 19:32 采纳率: 0%
浏览 30

Ajax调用工具提示方法

I have a number of images on my website, with a database with corresponding information. I am at a loss though as to how I should go about generating tooltips for this information.

I thought that using the div ID to do an ajax call to the database would be pretty clean and fairly quick. But I havent really had enough field experience to know if this is the best way to go about it.

I was also thinking that a script could run on page load, populating some elements with the information, which a tooltip would then access. But again, same question, is this the best way to do this?

I would like some possible solutions and why they are better/best with some kind of example code if that is okay.

UPDATE: This is the code I have so far. So now I need an Ajax call to the database to pull the info? How would I go about that? I have looked at the API but I am drawing a blank on implementation. I need a kick in the right direction.

$(document).ready(function(){
  $('.pane').each(function(){
    if( $(this).is(':empty') ) {
    $(this).append( "<p>Test</p>" );
    }
  });
});
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料