<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Jquery on Mike Bell - Blog &amp; Stuff</title><link>https://mikebell.io/tags/jquery/</link><description>Recent content in Jquery on Mike Bell - Blog &amp; Stuff</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>hello@mikebell.io (Mike Bell)</managingEditor><webMaster>hello@mikebell.io (Mike Bell)</webMaster><copyright>© 2026 Mike Bell</copyright><lastBuildDate>Fri, 07 Aug 2009 00:00:00 +0000</lastBuildDate><atom:link href="https://mikebell.io/tags/jquery/index.xml" rel="self" type="application/rss+xml"/><item><title>Jquery UI Tabs in Drupal 6</title><link>https://mikebell.io/posts/jquery-ui-tabs-in-drupal-6/</link><pubDate>Fri, 07 Aug 2009 00:00:00 +0000</pubDate><author>hello@mikebell.io (Mike Bell)</author><guid>https://mikebell.io/posts/jquery-ui-tabs-in-drupal-6/</guid><description>
&lt;p>A few months ago I saw an ubercart shop that had tabbed content on the product pages. Genius idea!&lt;/p>
&lt;p>As per rule 35 of drupal/the internet a module probably already exists but I decided to build this from scratch.&lt;/p>
&lt;p>It&amp;rsquo;s not a module so I won&amp;rsquo;t be releasing it, it&amp;rsquo;s more a proof of concept for me to learn some more drupal skills.&lt;/p>
&lt;p>My first attempt failed miserably attempting to shoe horn it into the default node.tpl.php. So rather than doing it this way I created a view to display node content based on the content type and an argument (something I&amp;rsquo;ve never really been too keen on). The thing I love most about Views is how it gives you everything you need to theme it. Within 2 minutes I had the code needed to make any modification to the views display. I then modified the row print to wrap a div tag around the three fields I&amp;rsquo;d created using CCK, I also created the list needed to fire the tabs.&lt;/p>
&lt;p>I&amp;rsquo;m new to the jQuery UI library so after reading up on tabs and looking at the source code I set about integrating everything I needed to get it to work, this included the div wrapping and list elements.&lt;/p>
&lt;p>The first real problem I encountered was the version of jQuery UI, it was the latest version and didn&amp;rsquo;t use the same version as Drupal does, after upgrading jQuery using the Update jQuery Module (#35 again!) and downloading the correct UI version I was set to go.&lt;/p>
&lt;p>The second problem was a bit obscure but easy to fix, the fields outputted by views were referenced as classes rather than IDs, after checking that they were unique therefore not breaking validity I changed the tpl.php file to use IDs, simple!&lt;/p>
&lt;p>Overall this was a neat little project something that I&amp;rsquo;ll use in other project definitely (including this site no doubt).&lt;/p>
&lt;p>Thanks for reading via RSS!&lt;/p>
&lt;p>Send me a message on &lt;a href="https://remotelab.uk/mikebell">Mastodon&lt;/a> or &lt;a href="mailto:hello@mikebell.io">email me&lt;/a>&lt;/p></description></item></channel></rss>