Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用jquery显示laravel雄辩的数据;Ajax";工具提示?_Jquery_Ajax_Laravel - Fatal编程技术网

如何使用jquery显示laravel雄辩的数据;Ajax";工具提示?

如何使用jquery显示laravel雄辩的数据;Ajax";工具提示?,jquery,ajax,laravel,Jquery,Ajax,Laravel,我是拉威尔的初学者。我有一个index.blade.php文件,数据以表格形式显示: 身份证件 名称 有效日期 行动 @foreach($event_detail['participants']作为$participant) {{$participant['id']} {{$participant['name']} {{$participant['date']} @csrf @方法('DELETE') 删除 @endforeach 我想用这个“工具提示(this);”JS函数显示一些有说服力

我是拉威尔的初学者。我有一个index.blade.php文件,数据以表格形式显示:


身份证件
名称
有效日期
行动
@foreach($event_detail['participants']作为$participant)
{{$participant['id']}
{{$participant['name']}
{{$participant['date']}
@csrf
@方法('DELETE')
删除
@endforeach
我想用这个“工具提示(this);”JS函数显示一些有说服力的数据(参与者姓名、日期,在mysql数据库中,并且已经连接好了):

$("tr").tooltip({
            track: true,
               $.ajax({
                    url:  
                    type:'post',
                    data:
                    success: function(){
                    }
                });
            }
        });

但是我不知道这个工具提示函数需要哪个属性。有什么想法吗?

我会给你这个问题的基本解决方案。您将相应地进行自定义。
首先,您可以在要显示工具提示的HTML标记内添加默认的
title
属性

<td class="can_filter" id="tooltip_td" title="Any default tooltip title">{{ $participant['name'] }}</td>

也可以在不添加默认工具提示标题的情况下执行此操作。这是一个基本的解决方案,我希望您能够获得基本的理解,并可以自己定制它。

为什么不在页面加载时呈现工具提示,而不是执行另一个ajax调用?哦,我收到了客户(客户)的某种请求。我开始使用ajax;A.当客户机发出请求时,您将决定提供什么样的解决方案,除非他们指定它应该是ajax。想象一下,在
tr
上到处玩鼠标,会有多个ajax垃圾邮件在你的服务器上传播。只是一个提示:)谢谢你的回复:)是的,应该是ajax。。我想使用ajax在工具提示上显示[
$participant->date
(假设数据库中有“participant”表和“date”列)]。而且你是对的。。隐马尔可夫模型。。然后单击一下可能会更好。谢谢!但是,我知道如何使用工具提示,但问题是我必须使用“Ajax”。我想使用ajax在工具提示上显示[
$participant->date
(假设数据库中有“participant”表和“date”列)]!我已经给了你基本信息。您可以在ajax函数下使用jQuery,比如
$.ajax({url:type:'post',data:success:function(data){$('tooltip_td').attr('title',data);})
<script type="text/javascript">
    $(document).ready(function()
    {
        $('#tooltip_td').attr('title', "{{ $laravelTooltip }}");
    });
</script>