开发者

qTip tooltip wont work

开发者 https://www.devze.com 2023-03-15 15:51 出处:网络
I am trying to get qTip to work, but it doesnt display any tooltips. this is my code: <script src=\"@Url.Content(\"~/Scripts/jquery-1.5.1.min.js\")\" type=\"text/javascript\">

I am trying to get qTip to work, but it doesnt display any tooltips. this is my code:

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript">

</开发者_如何学Pythonscript>
<script src="@Url.Content("~/Scripts/jquery.qtip-1.0.0-rc3.min.js")" type="text/javascript"></script>

<script type="text/javascript">
    // Create the tooltips only on document load
    $(document).ready(function () {

        $("#question").each(function() { 
        qtip({
        content: 'Dark themes are all the rage!',
        show: 'mouseover',
        hide: 'mouseout'
        style: { 
        name: 'dark', // Inherit from preset style

   }
});

</script>

And i have a div container that looks like this:

<div id="question">@Html.LabelFor(y => item.question_wording, item.question_wording)</div>

what have i done wrong?


Your code should look something like this:

$(document).ready(function () {
    $("#question").each(function() { 
        $(this).qtip({
            content: 'Dark themes are all the rage!',
            style: { 
                name: 'dark' // Inherit from preset style
            }
            show: 'mouseover',
            hide: 'mouseout'
       });
   });
});

Not quite sure if the hide/show options are correct.

0

精彩评论

暂无评论...
验证码 换一张
取 消