<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Tooltip on row hover with AJAX content - SOLUTION</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>kirti on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p30953</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p30953</guid>
        	        	<description><![CDATA[<p>Can you please post a demo.</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Mon, 18 Aug 2014 10:17:02 +0300</pubDate>
        </item>
        <item>
        	<title>wasim on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p25357</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p25357</guid>
        	        	<description><![CDATA[<p>Thanks for helping us.. that code is working fine.. but one issue.. many people may have this problem</p>
</p>
<p>put &#60;div id="tooltip"&#62;&#60;/div&#62; any where at your page and also give this css too</p>
<p>&#60;style&#62;#tooltip{position:absolute;}&#60;/style&#62;</p>
</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Fri, 09 Dec 2011 14:14:39 +0200</pubDate>
        </item>
        <item>
        	<title>ladracu2001 on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p19447</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p19447</guid>
        	        	<description><![CDATA[<p>I implemented the code but I find difficulties. Please explain how it is implemented. As I replace your code in "var str" and "$. Post (&#39;data2.php.&#39;" If you be so kind as to explain to you thank you very much.</p>
<p>Implement the method without the post method. Nice work.</p>
<p>A bug in the method causes mouse over the tooltip is not displayed in  the first row until you move the mouse to the next cell.</p>
]]></description>
        	        	<pubDate>Tue, 31 Aug 2010 21:58:29 +0300</pubDate>
        </item>
        <item>
        	<title>jakemonO on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p19416</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p19416</guid>
        	        	<description><![CDATA[<p>works but you need to remember to put the "tooltip" div into your HTML (even if it&#39;s empty) and set the css for the tooltip div to position: absolute</p>
]]></description>
        	        	<pubDate>Mon, 30 Aug 2010 20:54:12 +0300</pubDate>
        </item>
        <item>
        	<title>palobo on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p4008</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p4008</guid>
        	        	<description><![CDATA[<p>As requested, here is a demo page put together in much haste so please forgive it&#39;s poor appearance and content.</p>
<p>Also, check out the theme I&#39;m working on for jqGrid and let me know what you think of it. Click on search for a better idea of the form and modal window.</p>
<p>Cheers,<br />P.</p>
<p><a href="http://codeshop.info/demo/" target="_blank">Demo</a></p>
]]></description>
        	        	<pubDate>Fri, 16 Jan 2009 20:01:49 +0200</pubDate>
        </item>
        <item>
        	<title>palobo on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p4004</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p4004</guid>
        	        	<description><![CDATA[<p>Hi vkapoor.</p>
<p>Each row in jqGrid has a class of jqgrow. Therefore, the best way that I could find to target the row hover was to target $("#.jqgrow").</p>
<p>I will try and post a working demo of this as soon as possible. Hopefully this weekend Iwill have some spare time and do just that.</p>
<p>Not being any sort of jQuery expert I would need some help, but I would definetly like to try and port this to a plugin which could more esaily be integrated with jqGrid. (Hint hint Tony or any other expert around the forum!)</p>
<p>Cheers,</p>
<p>P.</p>
]]></description>
        	        	<pubDate>Fri, 16 Jan 2009 08:08:57 +0200</pubDate>
        </item>
        <item>
        	<title>vkapoor on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p3993</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p3993</guid>
        	        	<description><![CDATA[<p>palobo, I tried to use the snippet you provided. Can you please tell me what $(&#8221;.jqgrow&#8221;) is ?. That is not the main grid is it?.</p>
<p>Can you please post a demo.</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Thu, 15 Jan 2009 16:35:35 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p3963</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p3963</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks for sharing this solution to community.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 14 Jan 2009 08:10:22 +0200</pubDate>
        </item>
        <item>
        	<title>palobo on Tooltip on row hover with AJAX content - SOLUTION</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p3947</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/tooltip-on-row-hover-with-ajax-content-solution#p3947</guid>
        	        	<description><![CDATA[<p>Hi all.</p>
<p>I spent some time tracking down an elegant way to solve a small problem I had and am posting the solution here in the hope it will be useful for some.</p>
<p><strong><span style="text-decoration: underline;">The problem</span></strong></p>
<p>In a current project, I have a grid (various actually) with many columns. Personaly I hate sidescrolling and think it is unelegant. I initially opted to hide columns I thought would be less important. The columns had be present in edit for later retrieval of the data (repots and such...) but not visible all the time, or so I thought. Then I got complaints that the users could not see the data until the printed out a report (ok, in retrospect that was a major no no in usability terms :(... my bad ).</p>
</p>
<p><span style="text-decoration: underline;"><strong>The Solution</strong></span> (for me anyway 🙂 )</p>
<p>An elegant tooltip that would appear when we hovered over a row displaying all the hidden data. Nice. Now off to work on that solution.</p>
<p>Now there area quite a few plugins for tooltips but none seemed to catch my eye until i found <a href="http://www.kriesi.at/archives/create-simple-tooltips-with-css-and-jquery-part-2-smart-tooltips" target="_blank">this</a> (not a plugin). It shows a simple and elegant way to achieve a tooltip with a few lines jQuery and CSS. Now the initial script fetches data from the title attribute so a little alteration was in order.</p>
<p>FIrst on the menu. I found no clear way of getting the row id on hover. We have a few methods at our disposal, onDblClick, selectrow etc but no onHover (hint hint Tony 🙂 ) so one had to be quickly forged.</p>
<p>This is how I got it working... (finally after so much rambling... 😀 )</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6141' value='Select Code' data-codeid='sfcode6141' /></p>
<div class='sfcode' id='sfcode6141'>$("#grid").jqGrid({<br />...<br />...<br />...<br />gridComplete: function(){<br />&#160;&#160;&#160; var rowid; //ID of row with mouseover<br />&#160;&#160;&#160; var my_tooltip = $("#tooltip"); Div created for tooltip<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; $(".jqgrow").mouseover(function(e){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowid = $(e.target)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .parents("tr:first")<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .attr(&#39;id&#39;); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.post(&#39;data2.php&#39;,&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id: +rowid }, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; function(data){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var obj = eval(&#39;(&#39; + data + &#39;)&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var str = "Place data returned from ajax call in a nicely format manner here."</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#tooltip").html(str);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>$(".jqgrow").css({cursor:&#39;pointer&#39;}) <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; .mouseover(function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; &#160; my_tooltip.css({opacity:0.85, display:"none"})<br />.stop() // Added stop() to fix bug, flickering of tooltip<br />.fadeIn(400);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; })<br />.mousemove(function(kmouse){&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; var border_top = $(window).scrollTop();<br />&#160;&#160;&#160; var border_right = $(window).width();<br />&#160;&#160;&#160; var left_pos;<br />&#160;&#160;&#160; var top_pos;<br />&#160;&#160;&#160; var offset = 15;<br />&#160;&#160;&#160; if(border_right - (offset *2) &#62;= my_tooltip.width() + kmouse.pageX){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; left_pos = kmouse.pageX+offset;<br />&#160;&#160;&#160;&#160; } else{<br />&#160;&#160;&#160; &#160;&#160;&#160; left_pos = border_right-my_tooltip.width()-offset;<br />&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160; if(border_top + (offset *2)&#62;= kmouse.pageY - my_tooltip.height()){<br />&#160;&#160;&#160; &#160;&#160;&#160; top_pos = border_top +offset;<br />&#160;&#160;&#160;&#160; } else{<br />&#160;&#160;&#160; &#160;&#160;&#160; top_pos = kmouse.pageY-my_tooltip.height()-offset;<br />&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; my_tooltip.css({left:left_pos, top:top_pos});<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }).mouseout(function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; my_tooltip.stop().fadeOut(400);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160; },</p>
</div>
<p>I will post a demo online as soon as I can with this working and my theme for jQGrid.</p>
<p>Anyway, sorry for the long post and all the rambling, but I hope this helps someone.</p>
<p>All credits go to the authors of the tooltip, jqGrid and jQuery. I&#39;m just the monkey that mangled them together... 😀</p>
<p>Cheers,<br />P.</p></p>
]]></description>
        	        	<pubDate>Mon, 12 Jan 2009 18:29:46 +0200</pubDate>
        </item>
</channel>
</rss>