i want to display the data from ajax request to tooltip, it's open in modal window right now, but I want to open it into the tooltip, how can I do that, I tried a lot but didn't get success, I stucked at here, please help me to show data through tooltip.
this is my view code
echo $this->Manager->link('Groups',array('action'=> 'test_contact_group', $records['Contact']['contact_id']),array('class'=>'ajax_links'));
the html of this link is
<a class="ajax_links" help="a" href="/contacts/test_contact_group/78">Groups</a>
and jquery is there
<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>
it is diplay in modal window, but I want to open it in tooltip, how can I do that, please help me. thanks a ton in advance, I really stucked here.
Hope this will help you..
$(".ajax_links").hover(function(e) {
e.preventDefault();
var link = $(this).attr('href');
$.ajax({
type: "GET",
url: link,
success : function (data){
$('#elementId').attr('title',data);
}
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With