<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.81 (http://www.squarespace.com/) on Thu, 16 Feb 2012 00:43:20 GMT--><?xml-stylesheet type="text/css" href="/universal/styles/feed.css"?><rss version="2.0"><channel><title>Jeff Martin's Musings - Comments</title><link>http://jeffmartin.com/journal/</link><description></description><copyright></copyright><language>en-US</language><generator>Squarespace Site Server v5.11.81 (http://www.squarespace.com/)</generator><item><title>Diet programs comments on Exercise Increase</title><author>Diet programs</author><pubDate>Fri, 18 Nov 2011 09:02:16 +0000</pubDate><link>http://jeffmartin.com/journal/2009/9/9/exercise-increase.html#comments</link><guid isPermaLink="false">339264:3583846:comment/15868070</guid><description><![CDATA[<p>This is a great post; it was very informative. I look forward in reading more of your work.Weight loss tips to bear in mind is to ensure that they provide their bodies with enough liquid. In fact, it&#39;s a good idea to drink a glass of water before each meal. Thus, the stomach fills up a little, and not overeating. It is also important for a person on a mission to reduce weight to spread their meals throughout the day instead of having only 2-3 larger meals.</p>]]></description></item><item><title>apple comments on Gmail's Priority Inbox (Categorized Important Messages)</title><author>apple</author><pubDate>Wed, 21 Sep 2011 02:29:31 +0000</pubDate><link>http://jeffmartin.com/journal/2010/9/3/gmails-priority-inbox-categorized-important-messages.html#comments</link><guid isPermaLink="false">339264:3583846:comment/15119436</guid><description><![CDATA[<p>What is your sense of superiority is God Andrews horse? Is watching the IOS on the Capcom game is not exclusive to migrate to your superior Andrews up on the inexplicable?-<a href="http://www.qualityfake.com/quality-fake-christian-louboutin-992.html" rel="nofollow">christian louboutin replica boots</a></p>]]></description></item><item><title>apple comments on Restoring SQL Express Databases</title><author>apple</author><pubDate>Wed, 21 Sep 2011 02:28:55 +0000</pubDate><link>http://jeffmartin.com/journal/2010/9/16/restoring-sql-express-databases.html#comments</link><guid isPermaLink="false">339264:3583846:comment/15119426</guid><description><![CDATA[<p>Calm, saying I have apple Andrews, usually right at home, my wife and I are playing games with Apple, go out with Andrew, but unfortunately, the collision probability is too high, a friend said I also installed the old force, Chousi-<a href="http://www.qualityfake.com/quality-fake-louis-vuitton-283.html" rel="nofollow">louis vuitton replica wallets</a></p>]]></description></item><item><title>apple comments on Ads in Notification Bar in Android</title><author>apple</author><pubDate>Wed, 21 Sep 2011 02:28:29 +0000</pubDate><link>http://jeffmartin.com/journal/2011/8/18/ads-in-notification-bar-in-android.html#comments</link><guid isPermaLink="false">339264:3583846:comment/15119423</guid><description><![CDATA[<p>Andrews access to SD card music video and other files quickly ... you do not have third-party iPhone software to take a song let me see-<a href="http://www.qualityfake.com/quality-fake-tods-803.html" rel="nofollow">discount tods shoes</a></p>]]></description></item><item><title>Jeff Martin comments on A Custom Ellipsis Plug-in for JQuery</title><author>Jeff Martin</author><pubDate>Mon, 15 Aug 2011 11:03:03 +0000</pubDate><link>http://jeffmartin.com/journal/2009/11/9/a-custom-ellipsis-plug-in-for-jquery.html#comments</link><guid isPermaLink="false">339264:3583846:comment/14808332</guid><description><![CDATA[<p>Thanks for the info.  I will put this on my todo list to take a look at your suggestion</p>]]></description></item><item><title>Joel Berghoff comments on A Custom Ellipsis Plug-in for JQuery</title><author>Joel Berghoff</author><pubDate>Fri, 12 Aug 2011 21:43:34 +0000</pubDate><link>http://jeffmartin.com/journal/2009/11/9/a-custom-ellipsis-plug-in-for-jquery.html#comments</link><guid isPermaLink="false">339264:3583846:comment/14787761</guid><description><![CDATA[<p>It looks like there&#39;s a bug in your code, but I haven&#39;t tested extensively - I just know things didn&#39;t work correctly out of the box for me.</p><p>Line 37 (<code>t.append(&quot; &quot; + lessText + &quot;</a>&quot;);</code>) results in a &quot;less&quot; link appearing in every ellipsis element except for those where a &quot;more&quot; link should appear. Even if the moreText and lessText parameters are not specified, I get &quot;less&quot; links (which actually read &quot;undefined&quot;) on every element.</p><p>I am calling ellipsis() after some content has loaded dynamically, but I don&#39;t think it should matter. Line 37 has no conditionals around it so it&#39;s just getting called every time.</p><p>Anyway, now that I have removed that line everything seems to work great. Thanks for the code!</p>]]></description></item><item><title>David comments on A Custom Ellipsis Plug-in for JQuery</title><author>David</author><pubDate>Mon, 17 Jan 2011 01:34:13 +0000</pubDate><link>http://jeffmartin.com/journal/2009/11/9/a-custom-ellipsis-plug-in-for-jquery.html#comments</link><guid isPermaLink="false">339264:3583846:comment/11241963</guid><description><![CDATA[<p>@JeffMartin: thank you for making the ellipsis plugin work for multiple lines.</p><p>@Chris: thank you for pointing out where to check for undefined, and making this plugin more bullet-resistant.</p>]]></description></item><item><title>Jeff Martin comments on A Custom Ellipsis Plug-in for JQuery</title><author>Jeff Martin</author><pubDate>Wed, 01 Dec 2010 18:07:31 +0000</pubDate><link>http://jeffmartin.com/journal/2009/11/9/a-custom-ellipsis-plug-in-for-jquery.html#comments</link><guid isPermaLink="false">339264:3583846:comment/10696189</guid><description><![CDATA[<p>Yea... i guess I&#39;m going to say that the way this currently works, its probably not for use in tables of more than a few cells.  The way that it calculates the height is expensive.   It could certainly be adapted to some known height and widths so it doesn&#39;t do the binary search for the right size.  This was in the original design of the plugin not something I was interested in changing.  Would love to see a final result for one that works with tables better.</p>]]></description></item><item><title>Chris comments on A Custom Ellipsis Plug-in for JQuery</title><author>Chris</author><pubDate>Tue, 30 Nov 2010 08:38:05 +0000</pubDate><link>http://jeffmartin.com/journal/2009/11/9/a-custom-ellipsis-plug-in-for-jquery.html#comments</link><guid isPermaLink="false">339264:3583846:comment/10678454</guid><description><![CDATA[<p><code><br/>//ellipsis plugin http://devongovett.wordpress.com/2009/04/06/text-overflow-ellipsis-for-firefox-via-jquery/ + comments + custom mods<br/>(function ($) {<br/>	$.fn.ellipsis = function (lines, enableUpdating, moreText, lessText) {<br/>		return $(this).each(function () {<br/>			var el = $(this);<br/>			var resetDescription = function (height, originalText) {<br/>				el.html(originalText);<br/>				el.animate({ &quot;height&quot;: height }, &quot;normal&quot;, null, function () {<br/>					el.ellipsis(true, true, moreText, lessText);<br/>				});<br/>			}</p><p>			if (el.css(&quot;overflow&quot;) == &quot;hidden&quot;) {</p><p>				var originalText = el.html();<br/>				var availWidth = el.width();<br/>				var availHeight = el.height();</p><p>				var MoreLessTag;<br/>				if (moreText &amp;&amp; moreText != &#39;undefined&#39;) {<br/>					enableUpdating = true;<br/>					MoreLessTag = &quot; &quot; + moreText + &quot;</a>&quot;;<br/>				}<br/>				else MoreLessTag = &quot;&quot;;</p><p>				var t = $(this.cloneNode(true))<br/>                    .hide()<br/>                    .css({<br/>                    	&#39;position&#39;: &#39;absolute&#39;,<br/>                    	&#39;overflow&#39;: &#39;visible&#39;,<br/>                    	&#39;max-width&#39;: &#39;none&#39;,<br/>                    	&#39;max-height&#39;: &#39;none&#39;<br/>                    });<br/>				if (lines) t.css(&quot;height&quot;, &quot;auto&quot;).width(availWidth);<br/>				else t.css(&quot;width&quot;, &quot;auto&quot;);<br/>				el.after(t);<br/>				if(lessText &amp;&amp; lessText != &#39;undefined&#39;)<br/>					t.append(&quot; &quot; + lessText + &quot;</a>&quot;);</p><p>				var fullHeight = t.height();</p><p>				var avail = (lines) ? availHeight : availWidth;<br/>				var test = (lines) ? t.height() : t.width();<br/>				var foundMin = false, foundMax = false;<br/>				if (test &gt; avail) {<br/>					//Binary search style trimming of the temp element to find its optimal size<br/>					var min = 0;<br/>					var max = originalText.length;<br/>					while (min &lt;= max) {<br/>						var trimLocation = (min + max) / 2;<br/>						var text = originalText.substr(0, trimLocation);<br/>						t.html(text + &quot;…&quot; + MoreLessTag);</p><p>						test = (lines) ? t.height() : t.width();<br/>						if (test &gt; avail) {<br/>							if (foundMax)<br/>								foundMin = true;</p><p>							max = trimLocation - 1;<br/>							if (min &gt; max) {<br/>								//If we would be ending decrement the min and regenerate the text so we don&#39;t end with a<br/>								//slightly larger text than there is space for<br/>								trimLocation = (max + max - 2) / 2;<br/>								text = originalText.substr(0, trimLocation);<br/>								t.html(text + &quot;…&quot; + MoreLessTag);<br/>								break;<br/>							}<br/>						}<br/>						else if (test &quot; + lessText + &quot;</a>&quot;);<br/>						jQuery(&quot;.MoreLessTag&quot;, el).click(function (event) {<br/>							event.preventDefault();<br/>							resetDescription(availHeight, originalText);</p><p>						});<br/>					});<br/>				}<br/>				else {<br/>					var replaceTags = new RegExp(/&lt;\/?[^&gt;]+&gt;/gi);<br/>					el.attr(&quot;alt&quot;, originalText.replace(replaceTags, &#39;&#39;));<br/>					el.attr(&quot;title&quot;, originalText.replace(replaceTags, &#39;&#39;));<br/>				}</p><p>				if (enableUpdating == true) {<br/>					var oldW = el.width();<br/>					var oldH = el.height();<br/>					el.one(&quot;resize&quot;, function () {<br/>						if (el.width() != oldW || (lines &amp;&amp; el.height != oldH)) {<br/>							el.html(originalText);<br/>							el.ellipsis(lines, enableUpdating, moreText, lessText);<br/>						}<br/>					});<br/>				}<br/>			}</p><p>		});<br/>	};<br/>})(jQuery); <br/></code></p><p>I got the problem when applying it to a large table with lots of data (with the selector $(&quot;.tableHolder td&quot;)) that I got lots of undefined-links (More/less I guess), so I added some undefined-checks :)</p><p>And it got incredibly slow (took 11 seconds to load the page, 20 rows with 11 columns of data)</p>]]></description></item><item><title>Jeff Martin comments on A Custom Ellipsis Plug-in for JQuery</title><author>Jeff Martin</author><pubDate>Thu, 23 Sep 2010 15:37:30 +0000</pubDate><link>http://jeffmartin.com/journal/2009/11/9/a-custom-ellipsis-plug-in-for-jquery.html#comments</link><guid isPermaLink="false">339264:3583846:comment/9865116</guid><description><![CDATA[<p>@Jim, I will see what I can do.</p>]]></description></item></channel></rss>
