1

さまざまなコンテンツのツールチップを実装しようとしていますが、単に表示されません。js jQuery の次の行でエラーが発生します。

if ( targetElem.nodeType === 9 ) {
        targetWidth = target.width();
        targetHeight = target.height();
        basePosition = { top: 0, left: 0 };
    // TODO: use $.isWindow() in 1.9
    }

私のコードはこれです:

<script type="text/javascript">
        $(document).ready(function () {
            $("#MyInput").tooltip({
                content: function (response) {
                    return "Hi";
                },
                open: function () {
                    $(this).tooltip("widget").stop(false, true).hide().slideDown("fast");
                },
                close: function () {
                    $(this).tooltip("widget").stop(false, true).show().slideUp("fast");
                }
            }).tooltip("widget").addClass("ui-state-highlight");
        });
    </script>

入力

@Html.TextBoxFor(m => m.Table1.Id, new { @readonly = "readonly", id = "MyInput" })

コードの何が問題になっていますか?

アップデート

jQuery UI プラグインに何か問題があります。別のプラグイン「QTIP」に切り替えると、うまくいきました。

ありがとう!

4

0 に答える 0