Reputation: 47
I want to add tooltip on hover of flexigrid table column header. Different column with different tooltip content.
Flexigrid url : http://flexigrid.info/ GitHub url : https://github.com/paulopmx/Flexigrid
I didn't get anything regarding same on google.
Upvotes: 0
Views: 1229
Reputation: 1
if( cm.title != undefined )
{
$(th).attr('title', cm.title);
}
is working for me, but just on the top-right column header, not in other columns.
Upvotes: 0
Reputation: 2655
flexigrid.js line 916 add
if( cm.title != undefined ) {$(th).attr('title', cm.title);}
In your colModel section under
$("#flex1").flexigrid({
colModel : [
{display: 'MyDC',title: 'My Data Column', name : 'mydatacolumn', width : 100, sortable : true, align: 'center'}
]
});
You can then add a title: attribute.
Upvotes: 1
Reputation: 375
Would this not work for you? Unless I'm misunderstanding.. http://api.jqueryui.com/tooltip/
From the jQuery link:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery- ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
</head>
<body>
<p>
<a href="#" title="Anchor description">Anchor text</a>
<input title="Input help">
</p>
<script>
$( document ).tooltip();
</script>
</body>
jsFiddle: http://jsfiddle.net/jplahn/JnrBZ/
Upvotes: 1