如何通过工具提示显示数据库中的数据?

use*_*638 8 ajax jquery cakephp tooltip

我想显示从ajax请求到工具提示的数据,它现在在模态窗口中打开,但是我想把它打开到工具提示中,我怎么能这样做,我尝试了很多但没有成功,我坚持在这里,请帮我通过工具提示显示数据.

这是我的观看代码

  echo $this->Manager->link('Groups',array('action'=> 'test_contact_group', $records['Contact']['contact_id']),array('class'=>'ajax_links'));
Run Code Online (Sandbox Code Playgroud)

这个链接的HTML是

   <a class="ajax_links" help="a" href="/contacts/test_contact_group/78">Groups</a>
Run Code Online (Sandbox Code Playgroud)

和jquery在那里

     <script>
$(".ajax_links").hover(function(e) {

    e.preventDefault(); 
    var link = $(this).attr('href');

    $.ajax({ 
        type: "POST",   
        url: link,
        cache: false
    }).done(function( html ) { 

        jQuery('#myModal').modal('show');
        jQuery('.modal-body').html("Groups" + html);

    });
});


</script>
Run Code Online (Sandbox Code Playgroud)

它是在模态窗口中显示,但我想在工具提示中打开它,我该怎么做,请帮助我.非常感谢,我真的很喜欢这里.

Anu*_*sha 0

如果问题仅与 jquery 语法有关,您可以尝试以下操作:

   $(this).attr("title", html);
Run Code Online (Sandbox Code Playgroud)