<?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>indeedle &#187; jQuery</title>
	<atom:link href="http://indeedle.com/blog/category/web/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://indeedle.com</link>
	<description>blogging the indeedle way</description>
	<lastBuildDate>Thu, 26 Aug 2010 08:16:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>(Greasemonkey) Gaia Avatar Undo</title>
		<link>http://indeedle.com/blog/2010/03/30/greasemonkey-gaia-avatar-undo/</link>
		<comments>http://indeedle.com/blog/2010/03/30/greasemonkey-gaia-avatar-undo/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 05:10:20 +0000</pubDate>
		<dc:creator>Cody</dc:creator>
				<category><![CDATA[Greasemonkey]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[gaiaonline]]></category>

		<guid isPermaLink="false">http://indeedle.com/?p=126</guid>
		<description><![CDATA[I had another case of]]></description>
			<content:encoded><![CDATA[<p>I had another case of &#8220;distracted Greasemonkey writer&#8221;, where I&#8217;m on a web page and wondering why this certain something really doesn&#8217;t work that well.</p>
<p>Anyway, it resulted in me writing a new script, which I call the Avatar Undo. Like my last one, this is for GaiaOnline.com, and basically it adds a simple &#8220;undo&#8221; button to the avatar page. It records what items you put on, and in what order. Then when you click undo, it will go back and reverse those changes.</p>
<p>It is obviously not perfect, since it cannot compensate for server-side changes (like other items being removed due to layering clashes), however it is pretty good for the simple stuff.</p>
<p>This is something we all should hope Gaia adds, sometime in the future.</p>
<p>It can be found on my <a href="http://sweetnleo.com/greasemonkey/gaia/gaiaavatarundo.script" target="_blank">Gaia-based website</a>, as well as on <a href="http://userscripts.org/scripts/show/72597" target="_blank">Userscripts.org</a>.</p>
<p>Remember, this is a greasemonkey script, so if you don&#8217;t have it, <a href="https://addons.mozilla.org/en-US/firefox/addon/748" target="_blank">go get it</a>!</p>
<hr />
<p><small>© 2008 - 2010 for <a href="http://indeedle.com">indeedle</a>. All rights are reserved. | For more information please visit <a href="http://indeedle.com">indeedle</a>. |
<a href="http://indeedle.com/blog/2010/03/30/greasemonkey-gaia-avatar-undo/">Permalink</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://indeedle.com/blog/2010/03/30/greasemonkey-gaia-avatar-undo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDs starting with Numbers</title>
		<link>http://indeedle.com/blog/2010/03/28/ids-starting-with-numbers/</link>
		<comments>http://indeedle.com/blog/2010/03/28/ids-starting-with-numbers/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 21:54:19 +0000</pubDate>
		<dc:creator>Cody</dc:creator>
				<category><![CDATA[Greasemonkey]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[html standards]]></category>

		<guid isPermaLink="false">http://indeedle.com/?p=120</guid>
		<description><![CDATA[We all know the ID]]></description>
			<content:encoded><![CDATA[<p>We all know the ID and NAME conventions on HTML tags. The ID must start with a letter, and then afterwards can be any number, letter, hyphen, underscore or colon. So creating an ID of <strong>56green</strong> would not work, as it begins with the number 5. Where as <strong>S6green</strong> would be perfectly valid.</p>
<p>Recently I wrote a greasemonkey script, and I found (to my horror) the website had used alphanumeric strings as their IDs. That was fine, but the catch was they didn&#8217;t check to see if each string followed the standards, meaning half started with a number.</p>
<blockquote><p><a name="type-id"> <strong>ID</strong></a> and <a name="type-name"><strong>NAME</strong></a> tokens  must begin with a letter ([A-Za-z]) and may be followed by any number of  letters, digits ([0-9]), hyphens (&#8220;-&#8221;), underscores (&#8220;_&#8221;), colons (&#8220;:&#8221;), and  periods (&#8220;.&#8221;).</p>
<p style="text-align: right;"><a href="http://www.w3.org/TR/html4/types.html" target="_blank">http://www.w3.org/TR/html4/types.html</a></p>
</blockquote>
<p>It didn&#8217;t bother them, as the elements were not directly referred to. However it was a pain for me and my script, and so I had to find a way to call the element.</p>
<p>In my example, the name of the element will be <strong>25tuna</strong>.</p>
<pre class="brush: jscript;">$('#25tuna').hide();
// In this case, nothing would happen. The element would not hide,
// even if it was still on the page.

$('#25tuna').length
// Would = 0, even though we can see the element sitting on the page.</pre>
<p>Instead, I ended up having to use a workaround for the issue.</p>
<pre class="brush: jscript;">$('div[id=&quot;25tuna&quot;]').length; // now will equal 1
$('div[id=&quot;25tuna&quot;]').hide(); // should now work</pre>
<p>So while you can&#8217;t refer to the element using the regular notation, you can use it through attribute notation (since ID is another attribute on an HTML element).</p>
<p>This is not ideal, and does introduce its own performance issues. If it&#8217;s a case where you are able to alter the HTML element on the page directly (being your own website), do that and make the ID/NAME attributes conform. It will save effort and frustration.</p>
<p>However if you are writing a greasemonkey script (in jQuery like I did) then you may find this is your only option.</p>
<hr />
<p><small>© 2008 - 2010 for <a href="http://indeedle.com">indeedle</a>. All rights are reserved. | For more information please visit <a href="http://indeedle.com">indeedle</a>. |
<a href="http://indeedle.com/blog/2010/03/28/ids-starting-with-numbers/">Permalink</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://indeedle.com/blog/2010/03/28/ids-starting-with-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a CSS class to any disabled button</title>
		<link>http://indeedle.com/blog/2009/12/30/add-a-css-class-to-any-disabled-button/</link>
		<comments>http://indeedle.com/blog/2009/12/30/add-a-css-class-to-any-disabled-button/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 00:37:05 +0000</pubDate>
		<dc:creator>Cody</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://indeedle.com/?p=47</guid>
		<description><![CDATA[This adds the class of]]></description>
			<content:encoded><![CDATA[<p>This adds the class of &#8220;myclass&#8221; to any input with a type of &#8220;button&#8221; that is marked as disabled. This way you can easily style disabled buttons across a multitude of browsers.</p>
<pre class="brush: jscript;">$('input[type=button][disabled=disabled]').each(function(){
	$(this).addClass('myclass');
});</pre>
<hr />
<p><small>© 2008 - 2009 for <a href="http://indeedle.com">indeedle</a>. All rights are reserved. | For more information please visit <a href="http://indeedle.com">indeedle</a>. |
<a href="http://indeedle.com/blog/2009/12/30/add-a-css-class-to-any-disabled-button/">Permalink</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://indeedle.com/blog/2009/12/30/add-a-css-class-to-any-disabled-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->