<?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, Ajax, PHP, JSON, XML, Web Technologies &#187; DOM</title>
	<atom:link href="http://blog.chonla.com/category/dom/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.chonla.com</link>
	<description>คุยกันเรื่อง jQuery, Ajax, PHP, JSON, XML และ Web Technologies เป็นภาษาไทยกันดีกว่า</description>
	<lastBuildDate>Wed, 08 Sep 2010 19:28:16 +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>Selector จะเอาอะไรก็บอกมา เดี๋ยวฉันจะพาไป&#8230;</title>
		<link>http://blog.chonla.com/2008/10/selector-%e0%b8%88%e0%b8%b0%e0%b9%80%e0%b8%ad%e0%b8%b2%e0%b8%ad%e0%b8%b0%e0%b9%84%e0%b8%a3%e0%b8%81%e0%b9%87%e0%b8%9a%e0%b8%ad%e0%b8%81%e0%b8%a1%e0%b8%b2-%e0%b9%80%e0%b8%94%e0%b8%b5%e0%b9%8b%e0%b8%a2/</link>
		<comments>http://blog.chonla.com/2008/10/selector-%e0%b8%88%e0%b8%b0%e0%b9%80%e0%b8%ad%e0%b8%b2%e0%b8%ad%e0%b8%b0%e0%b9%84%e0%b8%a3%e0%b8%81%e0%b9%87%e0%b8%9a%e0%b8%ad%e0%b8%81%e0%b8%a1%e0%b8%b2-%e0%b9%80%e0%b8%94%e0%b8%b5%e0%b9%8b%e0%b8%a2/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 09:58:55 +0000</pubDate>
		<dc:creator>chonla</dc:creator>
				<category><![CDATA[DOM]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Chainability]]></category>
		<category><![CDATA[Selector]]></category>
		<category><![CDATA[XPath]]></category>

		<guid isPermaLink="false">http://blog.chonla.com/?p=60</guid>
		<description><![CDATA[Selector คืออะไร Selector ความจริงแล้วก็คือ String ที่บ่งบอกถึงตำแหน่งของสิ่งที่เราต้องการ ใน jQuery นี้ จะหมายถึง XPath ครับ ซึ่งจะใช้สำหรับในการอ้างถึง Element ต่าง ๆ ใน DOM ไม่ว่าจะเป็น HTML DOM หรือ XML DOM ก็ตาม ใน jQuery มี Selector อะไรให้ใช้บ้าง และแต่ละตัวใช้ยังไง อธิบายค่อนข้างยากครับ ถ้าจะให้เข้าไปอ่านเองในเว็บ [http://docs.jquery.com/API/1.2/Selectors] ก็ไม่รู้จะมานั่งเขียนบทความนี้ไปทำไม เอาเป็นว่าลองไปดู LIVE DEMO กันดีกว่าครับ มีให้หลากหลายตัวให้ใช้มาก (ใน LIVE DEMO จะเป็นแค่บางส่วนของ Selector ที่มีให้เท่านั้นนะครับ เอาพอหอมปากหอมคอ) ข้อดีของ Selector คือมันเป็น XPath ครับ ทำให้เราสามารถเข้าถึงส่วนต่าง ๆ ของ [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Selector คืออะไร</strong></p>
<p>Selector ความจริงแล้วก็คือ String ที่บ่งบอกถึงตำแหน่งของสิ่งที่เราต้องการ ใน jQuery นี้ จะหมายถึง XPath ครับ ซึ่งจะใช้สำหรับในการอ้างถึง Element ต่าง ๆ ใน DOM ไม่ว่าจะเป็น HTML DOM หรือ XML DOM ก็ตาม</p>
<p><span id="more-60"></span></p>
<p><strong>ใน jQuery มี Selector อะไรให้ใช้บ้าง และแต่ละตัวใช้ยังไง</strong></p>
<p>อธิบายค่อนข้างยากครับ ถ้าจะให้เข้าไปอ่านเองในเว็บ [<a title="jQuery Selector" href="http://docs.jquery.com/API/1.2/Selectors" target="_blank">http://docs.jquery.com/API/1.2/Selectors</a>] ก็ไม่รู้จะมานั่งเขียนบทความนี้ไปทำไม เอาเป็นว่าลองไปดู <a title="LIVE DEMO : jQuery Selectors" href="http://sandbox.chonla.com/selector" target="_blank">LIVE DEMO</a> กันดีกว่าครับ มีให้หลากหลายตัวให้ใช้มาก (ใน <a title="LIVE DEMO : jQuery Selectors" href="http://sandbox.chonla.com/selector" target="_blank">LIVE DEMO</a> จะเป็นแค่บางส่วนของ Selector ที่มีให้เท่านั้นนะครับ เอาพอหอมปากหอมคอ)</p>
<p>ข้อดีของ Selector คือมันเป็น XPath ครับ ทำให้เราสามารถเข้าถึงส่วนต่าง ๆ ของ DOM ได้อย่างอิสระ ไม่ว่าจะเป็น XML DOM หรือ HTML DOM ที่เราใช้กันบ่อย ก็จะหนีไม่พ้นเรื่องของ HTML DOM ครับ</p>
<p>หลังจากที่เราใช้ Selector เพื่อทำการเลือก Element ที่ต้องการแล้ว Type ของค่าที่ Return กลับมาจะเป็น Array ของ Element ที่ยังมีความสามารถของ jQuery อยู่ นั่นหมายถึงว่า เราสามารถที่จะเอาค่าที่ได้คืนจาก jQuery มา bind event หรือ เอามา append อะไรได้อีกต่อเนื่องกันเป็น Chain ครับ ทำให้เกิดคุณสมบัติที่เรียกว่า Chainability ครับ ถือว่าเป็นข้อดีข้อหนึ่งของ jQuery เลยทีเดียวครับ</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.chonla.com/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.chonla.com/2008/10/selector-%e0%b8%88%e0%b8%b0%e0%b9%80%e0%b8%ad%e0%b8%b2%e0%b8%ad%e0%b8%b0%e0%b9%84%e0%b8%a3%e0%b8%81%e0%b9%87%e0%b8%9a%e0%b8%ad%e0%b8%81%e0%b8%a1%e0%b8%b2-%e0%b9%80%e0%b8%94%e0%b8%b5%e0%b9%8b%e0%b8%a2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>การหาค่า Attribute ทั้งหมดใน Node ของ DOM ด้วย jquery</title>
		<link>http://blog.chonla.com/2008/10/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%ab%e0%b8%b2%e0%b8%84%e0%b9%88%e0%b8%b2-attribute-%e0%b8%97%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%ab%e0%b8%a1%e0%b8%94%e0%b9%83%e0%b8%99-node-%e0%b8%82%e0%b8%ad%e0%b8%87-do/</link>
		<comments>http://blog.chonla.com/2008/10/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%ab%e0%b8%b2%e0%b8%84%e0%b9%88%e0%b8%b2-attribute-%e0%b8%97%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%ab%e0%b8%a1%e0%b8%94%e0%b9%83%e0%b8%99-node-%e0%b8%82%e0%b8%ad%e0%b8%87-do/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 07:42:26 +0000</pubDate>
		<dc:creator>chonla</dc:creator>
				<category><![CDATA[Attribute]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.chonla.com/?p=5</guid>
		<description><![CDATA[เป็นเรื่องที่น่าสนใจอีกเรื่องหนึ่งในการที่เราจะหา attribute ทั้งหมดของ node หนึ่ง ๆ ของ DOM ด้วย jquery ได้อย่างไร ลองหาใน google อยู่นานก็ไม่พบคำตอบ เลยตัดสินใจลองเขียนขึ้นมาเอง งานนี้ได้ลอง 2 อย่างคือ ลองหาวิธีดึง attribute และวิธีการเขียน plugin ใน jquery ผลที่ได้คือ เราจะได้รายชื่อ attribute ที่ซ่อนอยู่ออกมาด้วยทั้งหมดครับ ไม่ว่าจะเป็น function ต่าง ๆ event ต่าง ๆ ออกมาหมดเลย มิน่าล่ะ ถึงไม่มีคนทำกัน เอ.. หรือว่าจริง ๆ แล้วมีแต่เราหาไม่เจอเองหนอ ลองไปดู LIVE DEMO กันได้เลยครับ]]></description>
			<content:encoded><![CDATA[<p>เป็นเรื่องที่น่าสนใจอีกเรื่องหนึ่งในการที่เราจะหา attribute ทั้งหมดของ node หนึ่ง ๆ ของ DOM ด้วย jquery ได้อย่างไร ลองหาใน google อยู่นานก็ไม่พบคำตอบ เลยตัดสินใจลองเขียนขึ้นมาเอง งานนี้ได้ลอง 2 อย่างคือ ลองหาวิธีดึง attribute และวิธีการเขียน plugin ใน jquery<br />
<span id="more-5"></span><br />
ผลที่ได้คือ เราจะได้รายชื่อ attribute ที่ซ่อนอยู่ออกมาด้วยทั้งหมดครับ ไม่ว่าจะเป็น function ต่าง ๆ event ต่าง ๆ ออกมาหมดเลย มิน่าล่ะ ถึงไม่มีคนทำกัน เอ.. หรือว่าจริง ๆ แล้วมีแต่เราหาไม่เจอเองหนอ</p>
<p>ลองไปดู <a title="LIVE DEMO : Get Node Attributes" href="http://sandbox.chonla.com/nodeattrib/" target="_blank">LIVE DEMO</a> กันได้เลยครับ</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.chonla.com/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.chonla.com/2008/10/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%ab%e0%b8%b2%e0%b8%84%e0%b9%88%e0%b8%b2-attribute-%e0%b8%97%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%ab%e0%b8%a1%e0%b8%94%e0%b9%83%e0%b8%99-node-%e0%b8%82%e0%b8%ad%e0%b8%87-do/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
