<?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>Webmaster-Source &#187; script.aculo.us</title>
	<atom:link href="https://www.webmaster-source.com/tag/scriptaculous/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.webmaster-source.com</link>
	<description>Useful Resources For Webmasters</description>
	<lastBuildDate>Thu, 24 Aug 2017 02:01:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>Include Common JavaScript Libraries in Your WordPress Theme</title>
		<link>https://www.webmaster-source.com/2008/11/12/include-common-javascript-libraries-in-your-wordpress-theme/</link>
		<comments>https://www.webmaster-source.com/2008/11/12/include-common-javascript-libraries-in-your-wordpress-theme/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 10:22:37 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[script.aculo.us]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=1010</guid>
		<description><![CDATA[I bet you didn&#8217;t know that WordPress already includes several common JavaScript libraries, ready to be called upon with a simple template tag. Libraries such as jQuery Scriptaculous Tiny MCE Thickbox Want to use jQuery in your theme, for a tabbed box, an AJAX something, or some sort of DHTML effect? You can add it [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I bet you didn&#8217;t know that WordPress already includes several common JavaScript libraries, ready to be called upon with a simple template tag. Libraries such as</p>
<ul>
<li>jQuery</li>
<li>Scriptaculous</li>
<li>Tiny MCE</li>
<li>Thickbox</li>
</ul>
<p>Want to use jQuery in your theme, for a tabbed box, an AJAX something, or some sort of DHTML effect? You can add it in with a single template tag in your header.<span id="more-1010"></span></p>
<p><code>&lt;?php wp_enqueue_script('jquery'); ?&gt;</code></p>
<p>That was easy, wasn&#8217;t it? The <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script">wp_enqueue_script</a> function can be used in plugins as well, so plugin authors, pleasestop bundling jQuery and Scriptaculous with your plugins. It&#8217;s not necessary.</p>
<p>The function can also be used to add your own scripts to a blog (whether you&#8217;re doing so from a them or plugin). The syntax is</p>
<p><code>&lt;?php wp_enqueue_script('handle', 'src', 'dependencies'); ?&gt;</code></p>
<p>&#8220;Handle&#8221; is a unique name you give to the script, &#8220;src&#8221; is the the script&#8217;s URL, and the optional last argument allows you to specify dependencies (i.e. scripts that must be loaded before the current one). For example, to load the jQuery UI Tabs package, which naturally requires jQuery, you would use something like this:</p>
<p><code>&lt;?php wp_enqueue_script('jquery-ui', 'http://example.org/wp-content/themes/my_theme/jquery/jquery-ui-tabs.js', 'jquery'); ?&gt;</code></p>
<p>The function will also ensure that the same script will not be loaded twice, if I&#8217;m not mistaken. Which means if you include jQuery in your theme, and you install a plugin that tries to load jQuery, it will only be loaded once.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2008/11/12/include-common-javascript-libraries-in-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>jQuery vs. Prototype</title>
		<link>https://www.webmaster-source.com/2007/11/20/jquery-vs-prototype/</link>
		<comments>https://www.webmaster-source.com/2007/11/20/jquery-vs-prototype/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 16:33:09 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[script.aculo.us]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/2007/11/20/jquery-vs-prototype/</guid>
		<description><![CDATA[The two biggest JavaScript frameworks in use are jQuery and Prototype. Until recently, I used Prototype a bit. After having to use jQuery for a recent project, I&#8217;ve actually started to enjoy using it. It&#8217;s easy to use, and it&#8217;s lightweight. I&#8217;m probably going to re-code a bunch of things over at NTugo so I [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The two biggest JavaScript frameworks in use are <a href="http://jquery.com">jQuery</a> and <a href="http://prototypejs.org/">Prototype</a>. Until recently, I used Prototype a bit. After having to use jQuery for a recent project, I&#8217;ve actually started to enjoy using it. It&#8217;s easy to use, and it&#8217;s lightweight. I&#8217;m probably going to re-code a bunch of things over at NTugo so I can use jQuery there instead of Prototype.  It&#8217;s a lot better.</p>
<p>Enough of my personal experiences, here are the hard facts:</p>
<h3>jQuery</h3>
<p><strong>File Size:</strong> 21KB</p>
<p><strong>Code Required to Toggle a DIV:</strong></p>
<p><code>&lt;script type="text/javascript"&gt;<br />
$('#mydivtrigger').click(function() {<br />
$('#mydiv').toggle(400);<br />
return false;<br />
});<br />
&lt;/script&gt;<br />
&lt;a href="#" id="mydivtrigger"&gt;Toggle!&lt;/a&gt;<br />
&lt;div id="mydiv"&gt;<br />
Lorem ipsum.<br />
&lt;/div&gt;</code><span id="more-298"></span></p>
<h3>Prototype</h3>
<p><strong>File Size:</strong> 63.3kb + 126kb for Script.aculo.us</p>
<p><strong>Code Required to Toggle a DIV (requires <a href="http://script.aculo.us/">Script.aculo.us</a>):</strong></p>
<p><code>&lt;script type="text/javascript"&gt;<br />
function toggleMyDiv() {<br />
Effect.toggle('mydiv','slide');<br />
return false;<br />
}<br />
&lt;/script&gt;<br />
&lt;a href="#" id="mydivtrigger" onClick="toggleMyDiv()"&gt;Toggle!&lt;/a&gt;<br />
&lt;div id="mydiv"&gt;<br />
Lorem ipsum.<br />
&lt;/div&gt;</code></p>
<p>The amount of code is similar, though Prototype + Script.aculo.us requires an onClick event handler. Not too big of a deal, though it&#8217;s kind of annoying. The biggest problem is file size. Do you honestly want to load 189.3KB&#8230;just for your JavaScript framework? That&#8217;s 27 seconds at 56 kilobits per second.</p>
<p>jQuery can do pretty much everything Prototype can do, and there&#8217;s even a Script.aculo.us equivalent: <a href="http://ui.jquery.com/">jQuery UI</a>. It&#8217;s pretty big, but you can hand-pick the parts <em>you</em> want, and save a lot of kilobytes.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2007/11/20/jquery-vs-prototype/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/


Served from: www.webmaster-source.com @ 2026-06-09 01:07:09 by W3 Total Cache
-->