Razor 将引导工具提示添加到datatable搜索栏

Razor 将引导工具提示添加到datatable搜索栏,razor,bootstrap-4,Razor,Bootstrap 4,我正在尝试将引导工具提示添加到数据表搜索框中,我似乎找不到任何帮助 这是我尝试过的,但不起作用: $('.dataTables_filter input').attr('title', 'Type here to search in the table'); 也许类似的方法会奏效: $('.dataTables_filter input').attr('data-toggle', 'tooltip') .attr('data-place

我正在尝试将引导工具提示添加到数据表搜索框中,我似乎找不到任何帮助 这是我尝试过的,但不起作用:

$('.dataTables_filter input').attr('title', 'Type here to search in the table');

也许类似的方法会奏效:

$('.dataTables_filter input').attr('data-toggle', 'tooltip')
                             .attr('data-placement', 'top')
                             .attr('title', 'Type here to search in the table')
                             .tooltip();
请注意,Bootstrap4依赖于Popper.js,因此您必须包含它以确保一切正常。

我已经验证了这一点。如前所述,Popper.js也是必需的。仔细观察,数据切换和放置属性似乎被忽略。$('.dataTables_filter input').attr('title','Type here to search in the table')。tooltip();