<?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>Alonso Robles &#187; jCarousel</title>
	<atom:link href="http://alonsorobles.com/tag/jcarousel/feed/" rel="self" type="application/rss+xml" />
	<link>http://alonsorobles.com</link>
	<description>technology, academia, and other tidbits from the trenches of a boggled mind</description>
	<lastBuildDate>Wed, 18 Apr 2012 02:48:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>jQuery and jCarousel in SharePoint</title>
		<link>http://alonsorobles.com/2009/06/24/jquery-and-jcarousel-in-sharepoint/</link>
		<comments>http://alonsorobles.com/2009/06/24/jquery-and-jcarousel-in-sharepoint/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 18:17:11 +0000</pubDate>
		<dc:creator>Alonso Robles</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Sharepoint Server]]></category>
		<category><![CDATA[Windows Sharepoint Services]]></category>
		<category><![CDATA[jCarousel]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[wss 3.0]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=155</guid>
		<description><![CDATA[I recently had to integrate jCarousel into a SharePoint web part. Since jCarousel is a plugin for jQuery, it means I also had to get jQuery integrated with SharePoint. In order to accomplish this, I followed some good feature packaging &#8230; <a href="http://alonsorobles.com/2009/06/24/jquery-and-jcarousel-in-sharepoint/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had to integrate <a href="http://sorgalla.com/jcarousel/">jCarousel</a> into a SharePoint web part. Since jCarousel is a plugin for <a href="http://jquery.com/">jQuery</a>, it means I also had to get jQuery integrated with SharePoint. In order to accomplish this, I followed some good feature packaging instructions found from a few different blog posts:</p>
<ul>
<li><a href="http://weblogs.asp.net/gunnarpeipman/archive/2008/12/12/sharepoint-jquery-deployment-feature.aspx">SharePoint jQuery Deployment Feature</a></li>
<li><a href="http://weblogs.asp.net/wesleybakker/archive/2008/12/18/sharepoint-jquery-stay-here-feature.aspx">SharePoint + jQuery = Stay Here Feature</a></li>
<li><a href="http://weblogs.asp.net/wesleybakker/archive/2008/12/16/sharepoint-slideshow-webpart.aspx">SharePoint Slideshow Web Part</a></li>
</ul>
<p>After figuring out how to package jCarousel and jQuery using SharePoint delegate controls, I was ready for business with the implementation of the web part.</p>
<p>The web part itself was nothing fancy. I used a Repeater control to generate the list item (LI) elements with the content I needed in the carousel. I wrapped the Repeater in an unordered list (UL) which was wrapped in a DIV tag that had the runat attribute set to server. So basically, I just followed the mark up instructions provided in the <a href="http://sorgalla.com/projects/jcarousel/#Getting-Started">jCarousel documentation</a>.</p>
<p>The wrapping DIV tag was used in my webpart code to initialize jCarousel. The code snippet below shows how I implemented it:</p>
<pre name="code" class="c-sharp:nogutter:nocontrols">
protected override void OnLoad(EventArgs e)
{
  if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType(), this.ClientID))
  {
    Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, @"
      &lt;script type=""text/javascript""&gt;
        jQuery(document).ready(function() {
          jQuery('#" + carouselDiv.ClientID + @"').jcarousel({
            // Configuration goes here
            vertical: true,
            scroll: 2,
            visible: 4
          });
        });
      &lt;/script&gt;
    ");
  }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2009/06/24/jquery-and-jcarousel-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

