<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JQuery | Woody Hayday | Blog</title>
	<atom:link href="https://blog.woodylabs.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.woodylabs.com</link>
	<description>An exploration of life, technology and writing</description>
	<lastBuildDate>Tue, 13 Jan 2015 15:19:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.woodylabs.com/wp-content/uploads/2015/01/cropped-woody-hayday-yosemite-glacier-point-32x32.jpg</url>
	<title>JQuery | Woody Hayday | Blog</title>
	<link>https://blog.woodylabs.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Fix/Hack to make AutoSuggest JQuery Plugin work</title>
		<link>https://blog.woodylabs.com/2011/11/fixhack-to-make-autosuggest-jquery-plugin-work/</link>
		
		<dc:creator><![CDATA[Woody]]></dc:creator>
		<pubDate>Wed, 09 Nov 2011 13:41:12 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[autosuggest]]></category>
		<category><![CDATA[client-side]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[ui]]></category>
		<guid isPermaLink="false">http://blog.woodylabs.com/?p=817</guid>

					<description><![CDATA[<p>When I came across Drew Wilson&#8217;s flashy JQuery Autosuggest plugin I happily downloaded the code and started using it within a recent project, but as I used it more and more I kept hitting a bug &#8211; don&#8217;t know if its just the version of JQuery I was tied to using or whether everyone using [&#8230;]</p>
<p>The post <a href="https://blog.woodylabs.com/2011/11/fixhack-to-make-autosuggest-jquery-plugin-work/">Fix/Hack to make AutoSuggest JQuery Plugin work</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p><hr /><a href="https://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
										<content:encoded><![CDATA[<p>When I came across <a href="http://code.drewwilson.com/entry/autosuggest-jquery-plugin" target="_blank">Drew Wilson&#8217;s flashy JQuery Autosuggest plugin</a> I happily downloaded the code and started using it within a recent project, but as I used it more and more I kept hitting a bug &#8211; don&#8217;t know if its just the version of JQuery I was tied to using or whether everyone using the pretty plugin suffers it. Either way there was peculiar happenings when removing elements, they would remove 75% of the time, but the other 25% they would remove only to not maintain the associated CSV list of objects properly. </p>
<p>Irritating when the thing looks so pretty out of the box. So rather than opt for one of the non-pretty options I just hacked it. Brutally I just added code to maintain an input as a csv, it needs fixing really but this does work, for now.</p>
<p><a href="https://blog.woodylabs.com/downloads/jquery.autoSuggest.fixed.csv.rar" target="_blank">Click here to download my hack/fixed version</a> which maintains a separate csv (in a designated ID &#8211; search replace &#8220;csvHolder&#8221; if you want to change its ID.)</p>
<p>Hopefully Drew can update his plugin so it works out of the box, its a really useful plugin. </p>
<p><strong>Note:</strong> This rar includes <a href="https://blog.woodylabs.com/2011/11/maintain-a-csv-with-javascript-keep-a-hidden-list/">my csv quick maintaining functions</a> which are required.</p><p>The post <a href="https://blog.woodylabs.com/2011/11/fixhack-to-make-autosuggest-jquery-plugin-work/">Fix/Hack to make AutoSuggest JQuery Plugin work</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unable to drop JQuery sortable onto empty list? Hack solution</title>
		<link>https://blog.woodylabs.com/2011/10/unable-to-drop-jquery-sortable-onto-empty-list-hack-solution/</link>
					<comments>https://blog.woodylabs.com/2011/10/unable-to-drop-jquery-sortable-onto-empty-list-hack-solution/#comments</comments>
		
		<dc:creator><![CDATA[Woody]]></dc:creator>
		<pubDate>Thu, 13 Oct 2011 11:34:29 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Sortable]]></category>
		<guid isPermaLink="false">http://blog.woodylabs.com/?p=789</guid>

					<description><![CDATA[<p>The problem: You have a multi column (or area) JQuery UI Sortable (these are neat) which only needs to show a &#8220;drop zone&#8221; when the user has started to drag a sortable object. The JQuery documentation for this doesn&#8217;t account for the reality of the above, its all very well if you want the empty [&#8230;]</p>
<p>The post <a href="https://blog.woodylabs.com/2011/10/unable-to-drop-jquery-sortable-onto-empty-list-hack-solution/">Unable to drop JQuery sortable onto empty list? Hack solution</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p><hr /><a href="https://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
										<content:encoded><![CDATA[<p>The problem: You have a multi column (or area) JQuery UI Sortable (these are neat) which only needs to show a &#8220;drop zone&#8221; when the user has started to drag a sortable object.</p>
<p>The JQuery documentation for this doesn&#8217;t account for the reality of the above, its all very well if you want the empty column/div to SHOW all the time as empty, that is remain as some sort of visible placeholder, but if the empty list should show as empty, until an object is ready to be dropped on it then JQuery sortable&#8217;s don&#8217;t work. It all comes down to dimensions, if an empty list exists without a height value, you can&#8217;t drop onto it.</p>
<p>More specifically, if an empty jquery-sortable list exists without a specific height set at the point of [.sortable start] (that is BEFORE the event is fired) then you just cannot drop the sortable.</p>
<div align="center" style="font-size:10px;"><img fetchpriority="high" decoding="async" src="http://farm3.static.flickr.com/2326/2378867408_4cc90791d6.jpg" width="500" height="375" alt="the JavaScript Code"><br />
<a href="http://www.flickr.com/photos/dmitry-baranovskiy/2378867408/" title="the JavaScript Code by Dmitry Baranovskiy, on Flickr">Image by Dmitry Baranovskiy</a></div>
<p>I played with fixing this by adjusting each empty list (in the example belows case #col1,#col2,#col3) to have a defined height (and background, which looks nice) within the sortable &#8220;start&#8221; option, but this just creates boxes (or landing pads/zones) you can see, but not drop on. </p>
<p>Long and short of it &#8211; the solution to being able to drop jquery sortable&#8217;s onto invisible empty lists is to bind a function which adds a css class (or sets the height specifically) to the empty (invisible) sortable list when a user clicks one of the goal objects. This is then fired BEFORE the sortable takes hold and so creates drag-droppable landing zones for the users held sortable. It then uses the sortables &#8220;stop&#8221; property to remove the class it has added to any columns which have it. </p>
<pre class="brush: jscript; title: ; notranslate">
function sortAndDrag() {
    
	//show BEFORE sortable starts
     $(&quot;#col1, #col2, #col3&quot;).bind('click mousedown', function(){
          $(&quot;.col&quot;).each(function (c) {
                if ($(&quot;div&quot;, this).size() == 0) {
                    $(this).addClass(&quot;colZoneEmpty&quot;)
                }
            })
     });
    
	//enable sortable
    $(&quot;#col1, #col2, #col3&quot;).sortable({
        revert: true,
        connectWith: &quot;.col&quot;,
        stop: function (a, d) {
            $(&quot;.col&quot;).removeClass(&quot;colZoneEmpty&quot;);
	    //any ajax processing
        }
    });
	
}
//in this example 3 column div's exist with the id's 'col1','col2','col3', all of which have the class 'col' 
//colZoneEmpty is a css class which makes the empty list visible
</pre>
<p>There are of course improvements you could make here, like checking the users dragging before setting any styling, but this quick hackaround works where it shouldn&#8217;t.</p><p>The post <a href="https://blog.woodylabs.com/2011/10/unable-to-drop-jquery-sortable-onto-empty-list-hack-solution/">Unable to drop JQuery sortable onto empty list? Hack solution</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.woodylabs.com/2011/10/unable-to-drop-jquery-sortable-onto-empty-list-hack-solution/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Firefox, why you mutate my css?</title>
		<link>https://blog.woodylabs.com/2011/06/firefox-why-you-mutate-my-css/</link>
		
		<dc:creator><![CDATA[Woody]]></dc:creator>
		<pubDate>Thu, 30 Jun 2011 06:07:40 +0000</pubDate>
				<category><![CDATA[Browser Compatibility]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[JQuery]]></category>
		<guid isPermaLink="false">http://blog.woodylabs.com/?p=851</guid>

					<description><![CDATA[<p>Quick post to remove the annoyance that is this bug from my short term memory, you would think this would work: var newBGString = $(this).css('background-image'); &#8230;it does, but not in firefox. Say the background property was set to &#8220;url(someimage.png) top left no-repeat&#8221;, making the background-image property &#8220;url(someimage.png)&#8221; right? In every browser except firefox, yes, not [&#8230;]</p>
<p>The post <a href="https://blog.woodylabs.com/2011/06/firefox-why-you-mutate-my-css/">Firefox, why you mutate my css?</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p><hr /><a href="https://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
										<content:encoded><![CDATA[<p>Quick post to remove the annoyance that is this bug from my short term memory, you would think this would work:</p>
<pre class="brush: jscript; title: ; notranslate">var newBGString = $(this).css('background-image');</pre>
<p>&#8230;it does, but not in firefox. Say the background property was set to &#8220;url(someimage.png) top left no-repeat&#8221;, making the background-image property &#8220;url(someimage.png)&#8221; right? In every browser except firefox, yes, not for firefox. Firefox would set the var as &#8220;url(&#8220;someimage.png&#8221;)&#8221; and THEN complain that the var is not realistic when you go on to use it elsewhere. </p>
<p>Anyway ridiculous bug, almost as annoying is how simple, hacky and rough the fix is:</p>
<pre class="brush: jscript; title: ; notranslate">var newBGString = $(this).css('background-image').replace('&quot;',''); </pre>
<p>So if your firefox doesn&#8217;t like background image swapping via js, try it, I guess&#8230;</p><p>The post <a href="https://blog.woodylabs.com/2011/06/firefox-why-you-mutate-my-css/">Firefox, why you mutate my css?</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
