<?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>bulblub&#187; programming</title>
	<atom:link href="http://bulblub.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://bulblub.com</link>
	<description>おこづかいもふやしたいプログラマのブログラマのブログ</description>
	<lastBuildDate>Mon, 27 Feb 2012 13:20:40 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>memo:ie6でのJavaScriptエラー</title>
		<link>http://bulblub.com/2011/04/14/memoie6%e3%81%a7%e3%81%aejavascript%e3%82%a8%e3%83%a9%e3%83%bc/</link>
		<comments>http://bulblub.com/2011/04/14/memoie6%e3%81%a7%e3%81%aejavascript%e3%82%a8%e3%83%a9%e3%83%bc/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 06:08:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://bulblub.com/?p=445</guid>
		<description><![CDATA[ie6においてJavaScriptのコメントに日本語を使用してる場合、JavaScriptを読み込んでいるページとエンコードが違うとエラーがでる。 エンコードを合わせるか、指定して回避。 1&#60;script char &#8230; <a href="http://bulblub.com/2011/04/14/memoie6%e3%81%a7%e3%81%aejavascript%e3%82%a8%e3%83%a9%e3%83%bc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>ie6においてJavaScriptのコメントに日本語を使用してる場合、JavaScriptを読み込んでいるページとエンコードが違うとエラーがでる。</p>
<p>エンコードを合わせるか、指定して回避。</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span>&gt;</span></div></td></tr></tbody></table></div>
<p>それとIEでArray.indexOfが実装されて無いそうで、実装する。</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>Array.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; Array.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">indexOf</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">===</span> target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> i<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://bulblub.com/2011/04/14/memoie6%e3%81%a7%e3%81%aejavascript%e3%82%a8%e3%83%a9%e3%83%bc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQueryとjQuery UIがロードされているかを確認するBookmarklet</title>
		<link>http://bulblub.com/2011/02/09/jquery%e3%81%a8jquery-ui%e3%81%8c%e3%83%ad%e3%83%bc%e3%83%89%e3%81%95%e3%82%8c%e3%81%a6%e3%81%84%e3%82%8b%e3%81%8b%e3%82%92%e7%a2%ba%e8%aa%8d%e3%81%99%e3%82%8bbookmarklet/</link>
		<comments>http://bulblub.com/2011/02/09/jquery%e3%81%a8jquery-ui%e3%81%8c%e3%83%ad%e3%83%bc%e3%83%89%e3%81%95%e3%82%8c%e3%81%a6%e3%81%84%e3%82%8b%e3%81%8b%e3%82%92%e7%a2%ba%e8%aa%8d%e3%81%99%e3%82%8bbookmarklet/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 00:14:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://bulblub.com/?p=411</guid>
		<description><![CDATA[ブックマークレットをjQueryで作る際にチェックが必要なので。 目的はjQuery及びjQuery UIを二重に読み込みを防ぐこと。jQueryとjQuery UIが読み込まれてるか確認するブックマークレット Samp &#8230; <a href="http://bulblub.com/2011/02/09/jquery%e3%81%a8jquery-ui%e3%81%8c%e3%83%ad%e3%83%bc%e3%83%89%e3%81%95%e3%82%8c%e3%81%a6%e3%81%84%e3%82%8b%e3%81%8b%e3%82%92%e7%a2%ba%e8%aa%8d%e3%81%99%e3%82%8bbookmarklet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>ブックマークレットをjQueryで作る際にチェックが必要なので。<br />
目的はjQuery及びjQuery UIを二重に読み込みを防ぐこと。<span id="more-411"></span>jQueryとjQuery UIが読み込まれてるか確認するブックマークレット</p>
<p><a href="javascript:(function(){alert(&quot;jQuery is &quot;+typeof jQuery);alert(&quot;jQuery UI is &quot;+typeof jQuery.ui)})();">Sample1</a></p>
<p>内容はこんな感じ</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">javascript<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'jQuery is '</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">typeof</span> jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'jQuery UI is '</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">typeof</span> jQuery.<span style="color: #660066;">ui</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>単純ですね。ロードされてなければ &#8220;undefind&#8221; を返してくるはずです。<br />
これにjQuery及びjQuery UIをロードするスクリプトを加えて</p>
<p><a href="javascript:(function(){alert(&quot;1:jQuery is &quot;+typeof jQuery);var b=document.createElement(&quot;script&quot;);b.type=&quot;text/javascript&quot;;b.src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js&quot;;document.body.appendChild(b);b.onload=function(){alert(&quot;1:jQuery UI is &quot;+typeof jQuery.ui);var a=document.createElement(&quot;script&quot;);a.type=&quot;text/javascript&quot;;a.src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js&quot;;document.body.appendChild(a);a.onload=function(){alert(&quot;2:jQuery is &quot;+typeof jQuery);alert(&quot;2:jQuery UI is &quot;+typeof jQuery.ui)}}})();">Sample2</a></p>
<p>こんな感じでロードされてるか、ロードされたかを確認できるのではないでしょうか。</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">javascript<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'1:jQuery is '</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">typeof</span> jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> a <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; a.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; a.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; a.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'1:jQuery UI is '</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">typeof</span> jQuery.<span style="color: #660066;">ui</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> b <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; b.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; b.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; b.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2:jQuery is '</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">typeof</span> jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2:jQuery UI is '</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">typeof</span> jQuery.<span style="color: #660066;">ui</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>実験</p>
<p><a href="http://jqueryui.com/demos/draggable/" target="_blank">http://jqueryui.com/demos/draggable/</a><br />
両方ロードされている筈です。</p>
<p><a href="http://www.google.com/" target="_blank">http://www.google.com/</a><br />
最初は1:でロードされていないものの、2:ではロードされています。</p>
<p>今回使ったjsを圧縮してくれるツール<br />
<a href="http://www.refresh-sf.com/yui/#output">Online JavaScript/CSS Compression Using YUI Compressor</a></p>
<p>最後に</p>
<p>バージョン違いには別途確認が必要ですね。</p>
]]></content:encoded>
			<wfw:commentRss>http://bulblub.com/2011/02/09/jquery%e3%81%a8jquery-ui%e3%81%8c%e3%83%ad%e3%83%bc%e3%83%89%e3%81%95%e3%82%8c%e3%81%a6%e3%81%84%e3%82%8b%e3%81%8b%e3%82%92%e7%a2%ba%e8%aa%8d%e3%81%99%e3%82%8bbookmarklet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

