<?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>DevtheWeb.NET &#187; jQuery</title>
	<atom:link href="http://www.devtheweb.net/blog/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtheweb.net/blog</link>
	<description></description>
	<lastBuildDate>Tue, 06 Dec 2011 19:25:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Simple Tips When Working with jCarousel</title>
		<link>http://www.devtheweb.net/blog/2010/02/01/simple-tips-when-working-with-jcarousel/</link>
		<comments>http://www.devtheweb.net/blog/2010/02/01/simple-tips-when-working-with-jcarousel/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 08:33:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=807</guid>
		<description><![CDATA[I wanted to create some automatic scrolling list of most popular articles in the home page. I found a jQuery plugin &#8211; jCarousel, it was everything I want. The example, I liked most was Carousel with external controls. Here&#8217;re few tips how to integrate jCarousel in your website: 1. Reduce the number of javascript and [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to create some automatic scrolling list of most popular articles in the <a href="http://www.devtheweb.net">home page</a>.</p>
<p>I found a jQuery plugin &#8211; jCarousel, it was everything I want. The example, I liked most was <a href="http://sorgalla.com/projects/jcarousel/examples/static_controls.html" target="_blank">Carousel with external controls</a>.</p>
<p><a href="http://www.devtheweb.net/blog/wp-content/uploads/2010/01/jcarousel-example.png" rel="lightbox[807]"><img class="alignnone size-full wp-image-808" title="jcarousel-example" src="http://www.devtheweb.net/blog/wp-content/uploads/2010/01/jcarousel-example.png" alt="" width="336" height="187" /></a></p>
<p>Here&#8217;re few tips how to integrate jCarousel in your website:</p>
<p><strong>1. Reduce the number of javascript and css files</strong></p>
<p>When you open the example page, in the head tag you can see  includes of 3 css files (style.css, jquery.jcarousel.css and skin.css), 2 js files (jquery-1.2.3.pack.js and jquery.jcarousel.pack.js), additional styles for the controls and some js code for initCallback callback. All of this css and js code can be moved in 2 files: 1 css and 1 js.</p>
<p>Note: when you move all code in one js file, it&#8217;s very important it to be moved in the same order as the included files. Also, when you move the content from jquery-1.2.3.pack.js, add &#8216;<strong>;</strong>&#8216;<strong> </strong>in the end of its content <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>2. Delete the images if they are not necessary</strong></p>
<p>In the css file you can see classed that use images files. If you don&#8217;t need these files (ex. images for &#8216;prev&#8217; and &#8216;next&#8217;), just delete them.</p>
<p><strong>3. Remove the unnecessary code</strong></p>
<p>In the css file there are too much classed that you wouldn&#8217;t need. Ex. if you use vertical position of your items list, you don&#8217;t need to keep classes for horizontal items list. Also, you could remove the unnecessary js code. Ex. I didn&#8217;t want to use prev and next buttons, so I delete all instances and code that uses buttonNextHTML, buttonPrevHTML, buttonNextEvent, buttonPrevEvent, buttonNextCallback, buttonPrevCallback.</p>
<p><strong>4. clear the comments, too</strong></p>
<p>You can see also a lot of comments in the js code. If we clear them, the code will work in the same way, but the file size will be less, which will allow it to be loaded by the visitor&#8217;s browsers faster <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So, I deleted all comments in code.</p>
<p>Instead of manual deleting of the comments you can use the <a href="http://www.devtheweb.net/tools/reduce-code-size.aspx" target="_blank">Reduce Code Size Tool</a>, it&#8217;ll remove all comments for you <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div><!--adsense--></div>
<p>I think jCarousel is a great jQuery plugin. But, if there&#8217;s a functionality that I don&#8217;t need for my purposes, I think it&#8217;s a good idea to remove it and to optimize the script loading to be faster <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/02/01/simple-tips-when-working-with-jcarousel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

