0

テーブルの特定の列にツール ヒントを提供する必要があります。私の見解:

<table class="tbl" id="dash" data-bind="with: Plan">
      <thead>
        <tr class="tag close">
          <th>Type</th>
          <th>Title</th>
        </tr>
      </thead>
      <tbody class="scrollContent" data-bind="foreach: Course">
        <tr>
          <td><i class="icon"></i></td>
          <td><a href="#" id="qtipselector_01" data-bind="text: Title"></a></td>
          <div id="TooltipContent_01" class="hidden">
            <a> Test Tool Tip</a>                 
          </div>
      </div>
    </tr> 
  </tbody>
 </table>

jquery と jquery.qtip.js を含めました。

マウス入力時にツールチップを表示する関数を作成しました。

 $('#qtipselector_01').qtip({
    content: $('div#TooltipContent_01').html(),
    position: {
        my: 'left center'
    },
    show: 'mouseenter',
        hide: {
            fixed: true,
            delay: 500,            
            when: {
                event: 'unfocus'
            }
        },
    style: {
        tip: {
          width: 20,
          height: 14,
        },
        width:280,
        height:100,    
        classes: 'qtipabc',        
    }
});

メインページ

<script src="Scripts/jquery.js" type="text/javascript"></script>
<script src="Scripts/jquery.qtip.js"></script>
<!--Template binding--><!-- This is where my view is getting binded--> 
<div id="Container" ua-app-id="topVm" data-bind='template: {name: pageModel, data: pageVM }'>                  
</div>
<script src="Scripts/abc.js"></script> <!--Place where .qtip is called-->

現在のところ機能していません。

4

1 に答える 1

0
$(document).ready(function(){
$('#qtipselector_01').qtip({
    content: $('div#TooltipContent_01').html(),
    position: {
        my: 'left center'
    },
    show: 'mouseenter',
        hide: {
            fixed: true,
            delay: 500,            
            when: {
                event: 'unfocus'
            }
        },
    style: {
        tip: {
          width: 20,
          height: 14
        },
        width:280,
        height:100,    
        classes: 'qtipabc'       
    }
});


});

qTipコードを$(document).readyブロック内に配置する必要があります。また、干渉する可能性のある余分なコンマがいくつかあります

于 2013-01-25T21:32:38.390 に答える