0

I am using data grid from www.phpgrid.com for my website. I want to customize the tool-tip to something custom. Which file should I mod and what should I do?

I saw a reference in their documentation :

http://phpgrid.uservoice.com/knowledgebase/articles/33488-tool-tip-for-column-headers

But this didn't work for me.

NorthCat
  • 9,643
  • 16
  • 47
  • 50
Hello Man
  • 693
  • 2
  • 12
  • 29

1 Answers1

2

What are you trying to do?? The code is pretty self-explanatory. Replace "Column 1 header title" for the first column header, replace "Column 2 header title" for the second one, and so forth.

jQuery(document).ready(function($){
    jQuery("tr.ui-jqgrid-labels th:eq(0)").attr("title", "Column 1 header title");
    jQuery("tr.ui-jqgrid-labels th:eq(1)").attr("title", "Column 2 header title");
    jQuery("tr.ui-jqgrid-labels th:eq(2)").attr("title", "Column 3 header title");

});
Audrey
  • 148
  • 1
  • 8
  • i have title of books in the grid data cells. when user hovers over it, i want them to see a short description of the book in the tool-tip rather than the title itself. – Hello Man Mar 17 '15 at 04:43
  • That's exactly what "title" attribute does. You should take a look w3school tutorial http://www.w3schools.com/tags/att_global_title.asp. Mouse over the text and WAIT FOR ABOUT 1 SECOND so the tooltip can appear. – Audrey Mar 18 '15 at 11:32