<?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:georss="http://www.georss.org/georss" 
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>bioneural.net &#187; jquery</title>
	<atom:link href="http://www.bioneural.net/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bioneural.net</link>
	<description>bioneural.net is for stuff worth sharing: commentary by Bruce McKenzie. Major topics covered are gadgets, informatics, Internet, Mac, mobile, musings, New Zealand, photography, Project Koru, quicklinks, rant, rave, travel and Windows</description>
	<pubDate>Thu, 07 Aug 2008 08:20:54 +0000</pubDate>
	
	<language>en</language>
	<image>
		<title>bioneural.net</title>
		<url>http://www.bioneural.net/images/kiwi-yellow-64px.png</url>
		<link>http://www.bioneural.net</link>
		<width>64</width>
		<height>64</height>
		<description>bioneural.net</description>
	</image>
		<item>
		<title>How to safely inject CSS3 using jQuery</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F14%2Fhow-to-safely-inject-css3-using-jquery%2F&amp;seed_title=How+to+safely+inject+CSS3+using+jQuery</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F14%2Fhow-to-safely-inject-css3-using-jquery%2F&amp;seed_title=How+to+safely+inject+CSS3+using+jQuery#comments</comments>
		<pubDate>Thu, 14 Feb 2008 14:14:56 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/02/14/how-to-safely-inject-css3-using-jquery/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">http://www.bioneural.net</a> : </p>So you fancy using some of that &#252;ber-cool draft CSS3 that WebKit browsers can handle, such as text shadows, drop shadows, opacity and rounded corners? But at the same time you want to present only valid CSS to the W3C CSS Validator? It's a dilemma, but it is possible to have your cake and eat it too&#8212;albeit by hiding CSS in JavaScript and thus cheating the Validator. However, there is even a precedent for doing so.


During the course of researching my review of the various ways to make rounded corners, drop shadows, and gradients I learned more about CSS3 and the jQuery JavaScript library. They just needed introducing to one another.

Text shadows, drop shadows, and round corners in Safari 3

A historical precedent

The concept of tricking the Validator to pass CSS that is incorrectly implemented or proprietary and not part of the W3C spec is not new. Many web developers have found it necessary to employ various hacks in their CSS to accommodate differences in the way browsers interpret the rules. Others have used proprietary code to overcome limitations or quirks in the way some browsers handle certain content. For example, the following in your document head could be used to fix IE6's lack of handling for transparent PNGs and mis-handling of the box model, floats, overflow, italics, etc.:





It's a hack: there's no other term for it. In the above example we're using proprietary conditional comments and filters to fix proprietary cock-ups. Seems fair, doesn't it?

So, if we can hack our ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F14%2Fhow-to-safely-inject-css3-using-jquery%2F&amp;seed_title=How+to+safely+inject+CSS3+using+jQuery/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>Corners, gradients and shadows with jQuery</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F13%2Fcorners-gradients-and-shadows-with-jquery%2F&amp;seed_title=Corners%2C+gradients+and+shadows+with+jQuery</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F13%2Fcorners-gradients-and-shadows-with-jquery%2F&amp;seed_title=Corners%2C+gradients+and+shadows+with+jQuery#comments</comments>
		<pubDate>Wed, 13 Feb 2008 15:36:40 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[webdev]]></category>

		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/02/13/corners-gradients-and-shadows-with-jquery/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">http://www.bioneural.net</a> : </p>Previously we looked at moving to jQuery, and then at the best way to do corners and gradients using a variety of techniques (Part 1). In this follow-on article (Part 2) I want to share how jQuery can be extended for similar cornering, gradient, and drop shadow visual effects. Although my JavaScript ability is not much beyond "cut and paste" the idea here is to share how easy it is to create these effects for other folk possessed by similar (in)ability.


Situation recap

In Part 1 we explored various ways to make rounded corners, comprising one or more of JavaScript, CSS, Flash, and SVG. Ditto for drop shadows. Implementing a gradient was restricted to the use of background (or inline) images, or to SVG. There are a few more tricks we might try for gradients:


	We could load a transparent PNG as a CSS background and vary the fill colour on the container to allow for a multitude of colour-graduated boxes without further image editing (see this ALA article);
	Unfortunately the CSS 3 draft as of this writing doesn't include background gradients, but you might be able to fake it using border-color;
	We could use JavaScript effects libraries.


It turns out we can use JavaScript to create our corners and drop shadows too. There's also a plugin for using curvyCorners with jQuery that more than halves the standalone curvyCorners code size.

Extending jQuery

While there are some basic effects (hide, toggle, slide, etc.) and manipulation options in the jQuery core API, jQuery UI is a bolt-on library of ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F02%2F13%2Fcorners-gradients-and-shadows-with-jquery%2F&amp;seed_title=Corners%2C+gradients+and+shadows+with+jQuery/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>bioneural.net site preference panel revisited</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F22%2Fbioneuralnet-site-preference-panel-revisited%2F&amp;seed_title=bioneural.net+site+preference+panel+revisited</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F22%2Fbioneuralnet-site-preference-panel-revisited%2F&amp;seed_title=bioneural.net+site+preference+panel+revisited#comments</comments>
		<pubDate>Tue, 22 Jan 2008 20:06:51 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[webdev]]></category>

		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/01/22/bioneuralnet-site-preference-panel-revisited/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">http://www.bioneural.net</a> : </p>The first version of my site preference panel for WordPress needed lots of JavaScript for the toggle (Proto.aculo.us), more JavaScript to switch styles, and still more JavaScript to change text size. Version 2 still uses JavaScript for the toggle effect&#8212;but no additional load&#8212;since jQuery is already utilised by K2. The rest is accomplished using server-side PHP, and the revised 3-column panel layout makes use of more recent CSS know-how. I've tried to modularize the preferences panel as much as possible, but some simple template editing is still required (at 4 points). It is optimised for K2 (tested using RC3 and RC4) and although I haven't tested it with other themes (that's your job!) I don't see why it couldn't be used (*Some tweaking may be required. Batteries not included.)


Get the files

Let's get it done, then come back to the how and why if you're interested. Download the files to create your own preference panel as siteprefs.zip, available here. Expand the archive and upload the folder "siteprefs" into your K2 main directory:

/wp-content/themes/k2/siteprefs/

At this point you may also want to download and activate the Theme Switcher plugin if you plan on allowing your audience to change the WordPress theme they see on a per-user basis (storing their preference in a cookie). Support for the plugin is built into the preference panel (see features, below).

It's yours to play with and customise; all I ask is that you retain the little "i" icon with it's link back to these instructions. Feedback and suggestions for ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F22%2Fbioneuralnet-site-preference-panel-revisited%2F&amp;seed_title=bioneural.net+site+preference+panel+revisited/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
		<item>
		<title>From Proto.aculo.us to jQuery</title>
		<link>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F06%2Ffrom-protoaculous-to-jquery%2F&amp;seed_title=From+Proto.aculo.us+to+jQuery</link>
		<comments>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F06%2Ffrom-protoaculous-to-jquery%2F&amp;seed_title=From+Proto.aculo.us+to+jQuery#comments</comments>
		<pubDate>Sun, 06 Jan 2008 18:31:03 +0000</pubDate>
		<dc:creator>Bruce</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[opensource]]></category>

		<category><![CDATA[webdev]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.bioneural.net/2008/01/06/from-protoaculous-to-jquery/</guid>
		<description><![CDATA[<p><a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" rel="license" title="This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License"><img src="http://www.bioneural.net/wp-content/themes/k2bn/styles/bioneural/cc.png" alt="CC" /></a> From <a href="http://www.bioneural.net/about/terms/">http://www.bioneural.net</a> : </p>As I recently noted, both WordPress and K2 have migrated from using Prototype plus script.aculo.us to using the jQuery JavaScript library. Prototype is a JavaScript framework, including a library of functions used to build Ajax applications. It's best buddies with script.aculo.us, an add-on JavaScript effects library that extends the capabilities of the former. So where does jQuery fit in?

The winds of change

WordPress hasn't altogether dropped either Prototype or script.aculo.us. As of version 2.3.2 they're still bundled in wp-includes/js/, but the Codex notes that since version 2.2:

Switched to jQuery for core JS, which is lighter and faster.

I'm no programmer, but I do understand that loading a smaller function library is kinder on your bandwidth and browser, and that writing fewer lines of script to call those functions is kinder on web developers.

K2, on the other hand, stopped bundling Prototype and script.aculo.us as of revision 382. This popular WordPress theme now does all its Ajax magic&#8212;Live Search, Rolling Archives, and Live Comments&#8212;via jQuery.

Loosing weight

As of this writing Prototype (1.6.0.1) weighs in at 121 KB. The six core files that make up script.aculo.us 1.8.1 (sound.js and unittest.js are optional) also happen to total 121 KB, making a combined size of 242 KB. If I could therefore use jQuery 1.2.1 (at 45 KB) to achieve the same JavaScript-mediated effects, I'd be using around one fifth of the code libraries I was previously loading. But it's worse than that, because if I retained Proto.aculo.us for custom effects and loaded jQuery for K2, I'd be wasting ...]]></description>
		<wfw:commentRss>http://www.bioneural.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fwww.bioneural.net%2F2008%2F01%2F06%2Ffrom-protoaculous-to-jquery%2F&amp;seed_title=From+Proto.aculo.us+to+jQuery/feed/</wfw:commentRss>
		<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
	</item>
	</channel>
</rss>
