0

当我使用以下代码时,出现此错误;“未捕获的 TypeError:$(...).tooltip 不是函数”

$(function () {
    $('[data-toggle="tooltip"]').tooltip();
})

我删除了 DevExpress javascripts 进行检查,它有效;

@Html.DevExpress().GetScripts(
new Script { ExtensionSuite = ExtensionSuite.NavigationAndLayout },
new Script { ExtensionSuite = ExtensionSuite.HtmlEditor },
new Script { ExtensionSuite = ExtensionSuite.GridView },
new Script { ExtensionSuite = ExtensionSuite.PivotGrid },
new Script { ExtensionSuite = ExtensionSuite.Editors },
new Script { ExtensionSuite = ExtensionSuite.Chart },
new Script { ExtensionSuite = ExtensionSuite.Report },
new Script { ExtensionSuite = ExtensionSuite.Scheduler },
new Script { ExtensionSuite = ExtensionSuite.TreeList },
new Script { ExtensionSuite = ExtensionSuite.Spreadsheet },
new Script { ExtensionSuite = ExtensionSuite.SpellChecker }
    )

我尝试这样做来解决冲突,但我得到“未捕获的类型错误:无法读取未定义的属性 'noConflict'”

$(function () {
    var bootstrapTooltip = $.fn.tooltip.noConflict();
    $.fn.bstooltip = bootstrapTooltip;
    $('[data-toggle="tooltip"]').bstooltip();
})

你有什么主意吗??

4

1 回答 1

0

这是 DevExpress 的答案;

https://www.devexpress.com/Support/Center/Question/Details/T249836#answers

于 2015-06-03T06:49:48.373 回答