<?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>bassistance.de &#187; jQuery</title>
	<atom:link href="http://bassistance.de/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://bassistance.de</link>
	<description>Jörn Zaefferer on Bass, Geeks and Rock'n'Roll</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:34:50 +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>Vector math basics to animate a bouncing ball in JavaScript</title>
		<link>http://bassistance.de/2011/12/09/vector-math-basics-to-animate-a-bouncing-ball-in-javascript/</link>
		<comments>http://bassistance.de/2011/12/09/vector-math-basics-to-animate-a-bouncing-ball-in-javascript/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 13:15:15 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=924</guid>
		<description><![CDATA[Vector math is pretty much essential when you want to do any kind of physics simulation, be it as simple as a bouncing ball. While my goal originally was to implement a flocking simulation (like birds flying close to each other, but not too close), the lack of math skills led me to build a [...]]]></description>
			<content:encoded><![CDATA[<p>Vector math is pretty much essential when you want to do any kind of physics simulation, be it as simple as a bouncing ball. While my goal originally was to implement a flocking simulation (like birds flying close to each other, but not too close), the lack of math skills led me to build a bouncing ball simulation first.</p>
<p>At the same time, I wanted to see what Khan Academy is all about. Turns out they have lessons on vector math, but there&#8217;s very little on vectors specifically. There are two lessons on vector basics, where <a href="http://www.khanacademy.org/video/linear-algebra--vector-examples?playlist=Linear+Algebra">this second one is a lot more practical</a>. There are also two exercises, <a href="http://www.khanacademy.org/exercise/adding_vectors">one for addition</a> of vectors, <a href="http://www.khanacademy.org/exercise/scaling_vectors">one for scaling</a>. Both are pretty easy and you should be done within a minute if you watched the video.</p>
<p>With that knowledge under your belt, let&#8217;s look at some practical application, the aforementioned bouncing ball. To start, <a href="http://jzaefferer.github.com/flocking/bouncing.html">take a look at the demo</a> and play around with it, there are some instructions at the top.</p>
<p>You can find the source code for that demo on GitHub, <a href="https://github.com/jzaefferer/flocking/blob/master/bouncing.js">here is the main file for the bouncing balls demo</a>. I&#8217;m not going to discuss the Point and Vector classes that this uses, <a href="https://github.com/jzaefferer/flocking/blob/master/math.js">though you should take a look</a>. They just implement adding and scaling of vectors, and calculating a vector based on two points. Let&#8217;s walk through the code:</p>
<pre><code>var GRAVITY = new Vector(0, 9.81);
var FRICTION = 0.85;
var world = {
	x1: 0,
	y1: 0
};
$(window).resize(function() {
	world.x2 = $(window).width();
	world.y2 = $(window).height();
}).trigger("resize");</code></pre>
<p>This defines two constants, GRAVITY and FRICTION, which we&#8217;ll use later to affect simulated objects. GRAVITY is a vector pointing downwards, where the second component represents the 9.81 meters per second, while the first component is zero. FRICTION is used in collisions later, and completely arbitrary.</p>
<p>The world object is also used in collision detection, and represents the dimensions of our 2d world. It starts at 0/0 in the left top corner, and ends in the right bottom corner. We bind a resize handler on window to update this calculation, that way collisions happen within the browser window, no matter how big it currently is.</p>
<p>Next up is the definition of our Ball class:</p>
<pre><code>function Ball() {
	this.position = new Point(200, 200);
	this.output = $("&lt;div>").addClass("dot").appendTo("body");
	this.velocity = new Vector(-5, 0);
}
Ball.prototype = {
	remove: function() {
		this.output.remove();
	},
	move: function() {
		// apply gravity
		this.velocity = this.velocity.add(GRAVITY.scale(0.1));

		// collision detection against world
		if (this.position.y > world.y2) {
			this.velocity.x2 = -this.velocity.x2 * FRICTION;
			this.position.y = world.y2;
		} else if (this.position.y < world.y1) {
			this.velocity.x2 = -this.velocity.x2 * FRICTION;
			this.position.y = world.y1;
		}
		if (this.position.x < world.x1) {
			this.velocity.x1 = -this.velocity.x1 * FRICTION;
			this.position.x = world.x1;
		} else {
			if (this.position.x > world.x2) {
				this.velocity.x1 = -this.velocity.x1 * FRICTION;
				this.position.x = world.x2;
			}
		}

		// update position
		this.position.x += this.velocity.x1;
		this.position.y += this.velocity.x2;

		// render
		this.output.css({
			left: this.position.x,
			top: this.position.y
		});
	}
};</code></pre>
<p>This defines a Ball constructor, which initializes a new Ball at some arbitrary position, with some velocity to the left. It also creates a simple DOM element that we use for output.</p>
<p>The prototype of Ball has two methods. The <code>remove</code> method just removes the DOM element, which we use for cleanup. The <code>move</code> method is much more intersting: It gets called for each &#8216;tick&#8217; of our animation loop, so we use it to update the current velocity, look for collisions, update the current position and render the result. Step by step:</p>
<pre><code>this.velocity = this.velocity.add(GRAVITY.scale(0.1));</code></pre>
<p>This adds GRAVITY to the balls velocity. While GRAVITY has a real world value, we need to adapt it to our pixel-based dimension. Doing this in every tick causes the ball to accelerate downwards, or when moving upwards, to deccelarate. With this alone our ball would start falling, but never stop. That&#8217;s where the next block comes in, the collision detection:</p>
<pre><code>if (this.position.y > world.y2) {
	this.velocity.x2 = -this.velocity.x2 * FRICTION;
	this.position.y = world.y2;
} else if (this.position.y < world.y1) {
	this.velocity.x2 = -this.velocity.x2 * FRICTION;
	this.position.y = world.y1;
}
if (this.position.x < world.x1) {
	this.velocity.x1 = -this.velocity.x1 * FRICTION;
	this.position.x = world.x1;
} else {
	if (this.position.x > world.x2) {
		this.velocity.x1 = -this.velocity.x1 * FRICTION;
		this.position.x = world.x2;
	}
}</code></pre>
<p>Here we compare the current position of our ball to the dimensions of the <code>world</code>. For each direction, there&#8217;s a check if the call is beyond the limit, if so, it inverts the velocity for that direction, while applying <code>FRICTION</code>. This causes the ball to bounce back slightly slower then it was before, simulating very primitive friction. To avoid glitches, where the ball goes beyond the world dimensions and doesn&#8217;t come back, the position gets updated to move it back inside the defined limits.</p>
<p>Now that we&#8217;ve updated the velocity (and fixed the position in case of a collision), we can update the resulting position and output it:</p>
<pre><code>// update position
this.position.x += this.velocity.x1;
this.position.y += this.velocity.x2;

// render
this.output.css({
	left: this.position.x,
	top: this.position.y
});</code></pre>
<p>This adds the velocity components to the position of the ball, then uses inline styles to update the position in the DOM.</p>
<p>Next we&#8217;ll look at the setup and animation loop:</p>
<pre><code>var balls = [];
balls.push(new Ball());

// animation loop
setInterval(function() {
	balls.forEach(function(ball) {
		ball.move();
	});
}, 25);</code></pre>
<p>Here we create an array of balls and add one initial Ball. Then start an interval to at 25ms, which should give us about 40 frames per second (fps). To get more smooth 60fps, we&#8217;d have to go down to 16.5ms, which would also be even more CPU intensive then this becomes with lots of balls.</p>
<p>Inside the interval, we just loop through all balls and call the move method for each. In a proper game engine, this loop would separate the position updates from the rendering to ensure that, when frames get dropped, the game itself doesn&#8217;t slow down.</p>
<p>Up next, we&#8217;ve got the code to add new balls, with user controlled initial velocity:</p>
<pre><code>var start;
$(document).mousedown(function(event) {
	start = new Point(event.pageX, event.pageY);
}).mouseup(function(event) {
	var end = new Point(event.pageX, event.pageY);
	var ball = new Ball();
	ball.position = end;
	ball.velocity = start.relative(end).scale(0.2);
	ball.move();
	balls.push(ball);
});</code></pre>
<p>Here we bind <code>mousedown</code> and <code>mouseup</code> events, each time creating a Point object from the <code>pageX</code> and <code>pageY</code> event properties. In the <code>mouseup</code> handler, we then use the end point as the starting position for the new Ball object. Using Point&#8217;s <code>relative</code> method, we calculate a vector between those two points, scale it down and use it as the velocity for the new ball. That way, you can just click anywhere to add a new ball, or click, drag and let go to create one with intial velocity based on the drag. To get the ball animated along with the others, its added to the <code>balls</code> array.</p>
<p>With that we&#8217;re almost at the end. The last piece just clears all balls when pressing Escape:</p>
<pre><code>$(document).keyup(function(event) {
	if (event.keyCode === 27) {
		balls.forEach(function(ball) {
			ball.remove();
		});
		balls.splice(0, balls.length);
	}
});</code></pre>
<p>And that&#8217;s it! Thanks to <code>Vector</code>, we&#8217;ve got a pretty sane implementation, and a good starting point for further improvements. And there&#8217;s lots of potential:</p>
<ul>
<li>Better friction simulation: Currently balls keep bouncing pretty often, they don&#8217;t slow down as much as they should after loosing some height.</li>
<li>More collision detection: Detecting collisions with other balls, the mouse or other objects would make the whole thing a lot more interesting.</li>
<li>Better collision detection: Currently collision detection just happens against a fixed position, not the actual ball&#8217;s dimensions. Taking the (rounded) borders into account would make things quite a bit more complicated, but also more realistic.</li>
<li>More moving objects with other shapes: Currently there&#8217;s just pixels bouncing around, even though they&#8217;re rendering as balls. Adding square objects both animated and static could make things a lot more interesting.</li>
<li>3D: Moving from a 2D to a 3D simulation involves adding another component to both the Vecotor and Point class, and would add that third dimensions to each calculation, making especially the collision detection, already the most complex part, even more complex.</li>
</ul>
<p>With this, I&#8217;ll get back to working on the basics for my flocking simulation.</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2011/12/09/vector-math-basics-to-animate-a-bouncing-ball-in-javascript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Release: Validation Plugin 1.9.0</title>
		<link>http://bassistance.de/2011/10/07/release-validation-plugin-1-9-0/</link>
		<comments>http://bassistance.de/2011/10/07/release-validation-plugin-1-9-0/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 10:34:51 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=858</guid>
		<description><![CDATA[An update for the jQuery validation plugin is available. Most notable is heavily improved compability with HTML5 controls: You can apply validation rules to input types like number, email or url, it&#8217;ll get picked up by the plugin if the type matches a rule, and a required attribute (with the argument) also works with both jQuery 1.6+ [...]]]></description>
			<content:encoded><![CDATA[<p>An update for the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery validation plugin</a> is available. Most notable is heavily improved compability with HTML5 controls: You can apply validation rules to input types like number, email or url, it&#8217;ll get picked up by the plugin if the type matches a rule, and a required attribute (with the argument) also works with both jQuery 1.6+ (prop) and previous versions (attr).</p>
<p>Another change should make the setup of forms with hidden elements easier, these are now ignored by default (option &#8220;ignore&#8221; has &#8220;:hidden&#8221; now as default). In theory, this could break an existing setup. In the unlikely case that it actually does, you can fix it by setting the ignore-option to &#8220;[]&#8221; (square brackets without the quotes).</p>
<p>A few improvements and bug fixes for validation methods landed:</p>
<ul>
<li>Creditcard now accepts spaces between the other valid characters</li>
<li>Email doesn&#8217;t accept a dot character at the end anymore.</li>
<li>The time method (in additionalMethods.js) is now more thorough.</li>
<li>A time12h method got added (also in additionalMethods.js), to validate 12-hour times, while the existing time method does 24-hour times.</li>
</ul>
<p>There also two new localizations, resulting in a total number of 38 localizations. Existing localizations saw various improvements &#8211; thanks to everyone who contributed those! Its the only feature where I&#8217;m relying completely on contributions, as I can&#8217;t verify the correctness of any of the localizations (other then English and German).</p>
<p>Backwards compatibility is still going strong: The plugin should work with anything from jQuery 1.3.x to 1.6.x.</p>
<p><strong><a href="http://jquery.bassistance.de/validate/jquery-validation-1.9.0.zip">Download this release.</a></strong></p>
<p>The full changelog:</p>
<ul>
<li>Added Basque (EU) localization</li>
<li>Added Slovenian (SL) localization</li>
<li>Fixed issue #127 &#8211; Finnish translations has one : instead of ;</li>
<li>Fixed Russian localization, minor syntax issue</li>
<li>Added in support for HTML5 input types, fixes #97</li>
<li>Improved HTML5 support by setting novalidate attribute on the form, and reading the type attribute.</li>
<li>Fixed showLabel() removing all classes from error element. Remove only settings.validClass. Fixes #151.</li>
<li>Added &#8216;pattern&#8217; to additional-methods to validate against arbitraty regular expressions.</li>
<li>Improved email method to not allow the dot at the end (valid by RFC, but unwanted here). Fixes #143</li>
<li>Fixed swedish and norwedian translations, min/max messages got switched. Fixes #181</li>
<li>Fixed #184 &#8211; resetForm: should unset lastElement</li>
<li>Fixed #71 &#8211; improve existing time method and add time12h method for 12h am/pm time format</li>
<li>Fixed #177 &#8211; Fix validation of a single radio or checkbox input</li>
<li>Fixed #189 &#8211; :hidden elements are now ignored by default</li>
<li>Fixed #194 &#8211; Required as attribute fails if jQuery&gt;=1.6 &#8211; Use .prop instead of .attr</li>
<li>Fixed #47, #39, #32 &#8211; Allowed credit card numbers to contain spaces as well as dashes (spaces are commonly input by users).</li>
</ul>
<div>As usual:</div>
<ul>
<li>Please post questions to the <a href="http://forum.jquery.com/using-jquery-plugins">official Using jQuery Plugins Forum</a>, tagging your question with (at least) &#8220;validate&#8221;. Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in no time.</li>
<li>Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the <a href="https://github.com/jzaefferer/jquery-validation/issues">GitHub issue tracker</a></li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2011/10/07/release-validation-plugin-1-9-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Release: Validation Plugin 1.8.1</title>
		<link>http://bassistance.de/2011/05/14/release-validation-plugin-1-8-1/</link>
		<comments>http://bassistance.de/2011/05/14/release-validation-plugin-1-8-1/#comments</comments>
		<pubDate>Sat, 14 May 2011 16:42:12 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=837</guid>
		<description><![CDATA[An update for the jQuery validation plugin is available. This brings compability with jQuery 1.6.1, while staying backwards compatible with 1.3.2, 1.4.2, 1.4.4 and 1.5.2. The bug was related to the plugin&#8217;s usage of the form.elements property, which jQuery 1.6 doesn&#8217;t support anymore. Other then that, there is a bug fix for adding and removing [...]]]></description>
			<content:encoded><![CDATA[<p>An update for the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery validation plugin</a> is available. This brings compability with jQuery 1.6.1, while <a href="http://jquery.bassistance.de/validate/test/">staying backwards compatible with 1.3.2, 1.4.2, 1.4.4 and 1.5.2</a>.</p>
<p>The bug was related to the plugin&#8217;s usage of the form.elements property, which jQuery 1.6 doesn&#8217;t support anymore. Other then that, there is a bug fix for adding and removing the error and valid classes on radio and checkbox elements (thanks to Phil Haack for the contribution), as well as two new localizations: Thai and Vietnamese. That brings the plugin to a total of 37 supported locales.</p>
<p>If you&#8217;ve been testing 1.8.0 release with jQuery 1.6 and couldn&#8217;t get it to work, despite the note saying that its working, please update to 1.8.1. The form.elements fix was in place before 1.6 final got released, and I only tested against latest code on GitHub, while 1.8.0 was indeed broken.</p>
<p><strong><a href="http://jquery.bassistance.de/validate/jquery-validation-1.8.1.zip">Download this release.</a></strong></p>
<p>The full changelog:</p>
<ul>
<li>Added Thai (TH) localization, fixes #85</li>
<li>Added Vietnamese (VI) localization, thanks Ngoc</li>
<li>Fixed issue #78. Error/Valid styling applies to all radio buttons of same group for required validation.</li>
<li>Don&#8217;t use form.elements as that isn&#8217;t supported in jQuery 1.6 anymore. Its buggy as hell anyway (IE6-8: form.elements === form).</li>
</ul>
<ul>
<li>Please post questions to the <a href="http://forum.jquery.com/using-jquery-plugins">official Using jQuery Plugins Forum</a>, tagging your question with (at least) &#8220;validate&#8221;. Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in no time.</li>
<li>Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the <a href="https://github.com/jzaefferer/jquery-validation/issues">GitHub issue tracker</a></li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2011/05/14/release-validation-plugin-1-8-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Release: Validation Plugin 1.8</title>
		<link>http://bassistance.de/2011/03/25/release-validation-plugin-1-8/</link>
		<comments>http://bassistance.de/2011/03/25/release-validation-plugin-1-8/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 13:43:38 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=830</guid>
		<description><![CDATA[An update for the jQuery validation plugin is available. This brings compability with jQuery 1.5.1, while staying backwards compatible with 1.3.2, 1.4.2, 1.4.4 and 1.5.0. A bug related to remove validation with client-side formatted messages was fixed, along with improvements to localizations and four new ones, resulting in a total of 34 localizations. This release [...]]]></description>
			<content:encoded><![CDATA[<p>An update for the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery validation plugin</a> is available. This brings compability with jQuery 1.5.1, while <a href="http://jquery.bassistance.de/validate/test/">staying backwards compatible with 1.3.2, 1.4.2, 1.4.4 and 1.5.0</a>.</p>
<p>A bug related to remove validation with client-side formatted messages was fixed, along with improvements to localizations and four new ones, resulting in a total of 34 localizations.</p>
<p>This release is the first to use Google Closure Compiler for minifying files. Like other projects, I&#8217;ve dropped the .pack.js files in favor of minifying and gzipping.</p>
<p><strong><a href="http://jquery.bassistance.de/validate/jquery-validation-1.8.0.zip">Download this release.</a></strong></p>
<p>The full changelog:</p>
<ul>
<li><a href="http://plugins.jquery.com/node/14120">Improved NL localization</a></li>
<li>Added Georgian (GE) localization, thanks Avtandil Kikabidze</li>
<li>Added Serbian (SR) localization, thanks Aleksandar Milovac</li>
<li>Added ipv4 and ipv6 to additional methods, thanks Natal Ngétal</li>
<li>Added Japanese (JA) localization, thanks Bryan Meyerovich</li>
<li>Added Catalan (CA) localization, thanks Xavier de Pedro</li>
<li>Fixed missing var statements within for-in loops</li>
<li><a href="https://github.com/jzaefferer/jquery-validation/issues/11">Fix for remote validation, where a formatted message got messed up</a></li>
<li>Bugfixes for compability with jQuery 1.5.1, while maintaining backwards-compability</li>
</ul>
<p>The migration to GitHub is mostly complete, issues are now tracked there:</p>
<ul>
<li>Please post questions to the <a href="http://forum.jquery.com/using-jquery-plugins">official Using jQuery Plugins Forum</a>, tagging your question with (at least) &#8220;validate&#8221;. Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in no time.</li>
<li>Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the <a href="https://github.com/jzaefferer/jquery-validation/issues">GitHub issue tracker</a></li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2011/03/25/release-validation-plugin-1-8/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Autocomplete is dead, long live Autocomplete!</title>
		<link>http://bassistance.de/2010/06/23/autocomplete-is-dead-long-live-autocomplete/</link>
		<comments>http://bassistance.de/2010/06/23/autocomplete-is-dead-long-live-autocomplete/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 14:07:44 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=675</guid>
		<description><![CDATA[I&#8217;m finally deprecating the jQuery autocomplete plugin, about four years after its creation (which was actually a merge of two forks of another plugin). jQuery UI 1.8 was released in March, bundling the brand new Autocomplete widget and a worthy successor of my standalone plugin. The API is way more simpler while much more capable, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m finally deprecating the jQuery autocomplete plugin, about four years after its creation (which was actually a merge of two forks of another plugin). jQuery UI 1.8 was released in March, bundling the brand new <a href="http://jqueryui.com/demos/autocomplete/">Autocomplete widget</a> and a worthy successor of my standalone plugin. The API is way more simpler while much more capable, eg. its now trivial to work with JSON. And thanks to Themeroller-support, the result looks a lot better.</p>
<p>Today I&#8217;ve finally finished the <a href="http://www.learningjquery.com/2010/06/autocomplete-migration-guide">Autocomplete Migration Guide</a>, which explains how to migrate from ye olde plugin to the new jQuery UI Autocomplete widget. It covers the various options and their replacements, if any. In a lot of cases, we were able to get rid of the options by providing better defaults or by restructuring the API, with the <code>source</code> option being the most prominent example.</p>
<p>The next major jQuery UI release should include the new Tooltip widget, paving the way to shut down another plugin on this site.</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2010/06/23/autocomplete-is-dead-long-live-autocomplete/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Release: Validation Plugin 1.7</title>
		<link>http://bassistance.de/2010/03/10/release-validation-plugin-1-7/</link>
		<comments>http://bassistance.de/2010/03/10/release-validation-plugin-1-7/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 22:49:14 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=615</guid>
		<description><![CDATA[An update for the jQuery validation plugin is available. Most important: Its now fully compatible with jQuery 1.4.2, and still fully compatible with jQuery 1.3.2. I didn&#8217;t test with 1.2.6, but it should work, too. There are four new localizations: Lithuanian, Greek, Latvian and Hebrew. The Spanish localization got a few improvements (I fully trust [...]]]></description>
			<content:encoded><![CDATA[<p>An update for the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery validation plugin</a> is available. Most important: Its now fully compatible with jQuery 1.4.2, and still fully compatible with jQuery 1.3.2. I didn&#8217;t test with 1.2.6, but it should work, too.</p>
<p>There are four new localizations: Lithuanian, Greek, Latvian and Hebrew. The Spanish localization got a few improvements (I fully trust my contributors on that). Someone also contributed phoneUK and mobileUK methods, which can be found in <a href="http://jquery.bassistance.de/validate/additional-methods.js">additional-methods.js</a> (while adding those, I renamed the phone-method to phoneUS).</p>
<p>And as a first proof of concept, there is now a <a href="http://jquery.bassistance.de/validate/demo/themerollered.html">demo styled with jQuery UI Themeroller classes</a>. I&#8217;ll improve that when form support gets better in jQuery UI (planned for 1.9).</p>
<p><a href="http://jquery.bassistance.de/validate/jquery.validate.zip">Download this release.</a></p>
<p>The full changelog:</p>
<ul>
<li>Added Lithuanian (LT) localization</li>
<li>Added Greek (EL) localization (<a href="http://plugins.jquery.com/node/12319">http://plugins.jquery.com/node/12319</a>)</li>
<li>Added Latvian (LV) localization (<a href="http://plugins.jquery.com/node/12349">http://plugins.jquery.com/node/12349</a>)</li>
<li>Added Hebrew (HE) localization (<a href="http://plugins.jquery.com/node/12039">http://plugins.jquery.com/node/12039</a>)</li>
<li>Fixed Spanish (ES) localization (<a href="http://plugins.jquery.com/node/12696">http://plugins.jquery.com/node/12696</a>)</li>
<li>Added <a href="http://jquery.bassistance.de/validate/demo/themerollered.html">jQuery UI themerolled demo</a></li>
<li>Removed cmxform.js</li>
<li>Fixed four missing semicolons (<a href="http://plugins.jquery.com/node/12639">http://plugins.jquery.com/node/12639</a>)</li>
<li>Renamed phone-method in additional-methods.js to phoneUS</li>
<li>Added phoneUK and mobileUK methods to additional-methods.js (<a href="http://plugins.jquery.com/node/12359">http://plugins.jquery.com/node/12359</a>)</li>
<li>Deep extend options to avoid modifying multiple forms when using the rules-method on a single element (<a href="http://plugins.jquery.com/node/12411">http://plugins.jquery.com/node/12411</a>)</li>
<li>Bugfixes for compability with jQuery 1.4.2, while maintaining backwards-compability</li>
</ul>
<p>The right place for support changed a bit &#8211; the mailinglist is no more, replaced by a much cooler forum:</p>
<ul>
<li>Please post questions to the <a href="http://forum.jquery.com/using-jquery-plugins">official Using jQuery Plugins Forum</a>, tagging your question with (at least) &#8220;validate&#8221;. Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in no time.</li>
<li>Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the <a href="http://plugins.jquery.com/project/issues/validate">plugins.jQuery.com bug tracker</a> (requires <a href="http://plugins.jquery.com/user/register">registration</a>).</li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2010/03/10/release-validation-plugin-1-7/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Release: Validation Plugin 1.6</title>
		<link>http://bassistance.de/2009/11/30/release-validation-plugin-1-6/</link>
		<comments>http://bassistance.de/2009/11/30/release-validation-plugin-1-6/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:36:42 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=591</guid>
		<description><![CDATA[Update update: Files are now availble via Microsoft&#8217;s AJAX CDN. An update for the jQuery validation plugin is available. There are five new localizations (now at 26 in total), including Arabic and Farsi (both right-to-left). Validation of selects is now more interactive, click events are properly handled to provide quicker feedback (also a bug related [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update update</strong>: Files are now availble via Microsoft&#8217;s AJAX CDN.</p>
<p>An update for the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery validation plugin</a> is available. There are five new localizations (now at 26 in total), including Arabic and Farsi (both right-to-left). Validation of selects is now more interactive, click events are properly handled to provide quicker feedback (also a bug related to selects in IE8 is fixed). The equalTo-method is now aware of changes to the target field, so a change to a password field will be reflected in a confirm-password field. And more&#8230;</p>
<p><a href="http://jquery.bassistance.de/validate/jquery.validate.zip">Download this release.</a></p>
<p>The only not fully backwards-compatible change (if you spot anything else, please <a href="http://plugins.jquery.com/project/issues/validate">report it as a bug</a>): The dateDE and numberDE methods were replaced with a localization/methods_de.js file, with localized versions of both the date and number methods. There are also localized methods for the NL and PT locales. The goal is to gather more localized versions of these, similar to the localized messages.</p>
<p>The full changelog:</p>
<ul>
<li>Added Arabic (AR), Portuguese (PTPT), Persian (FA), Finnish (FI) and Bulgarian (BR) localization</li>
<li>Updated Swedish (SE) localization (some missing html iso characters)</li>
<li>Fixed $.validator.addMethod to properly handle empty string vs. undefined for the message argument</li>
<li>Fixed two accidental global variables</li>
<li>Enhanced min/max/rangeWords (in additional-methods.js) to strip html before counting; good when counting words in a richtext editor</li>
<li>Added localized methods for DE, NL and PT, removing the dateDE and numberDE methods (use messages_de.js and methods_de.js with date and number methods instead)</li>
<li>Fixed remote form submit synchronization, kudos to Matas Petrikas</li>
<li>Improved interactive select validation, now validating also on click (via option or select, inconsistent across browsers); doesn&#8217;t work in Safari, which doesn&#8217;t trigger a click event at all on select elements; fixes <a href="http://plugins.jquery.com/node/11520">http://plugins.jquery.com/node/11520</a></li>
<li>Updated to latest form plugin (2.36), fixing <a href="http://plugins.jquery.com/node/11487">http://plugins.jquery.com/node/11487</a></li>
<li>Bind to blur event for equalTo target to revalidate when that target changes, fixes <a href="http://plugins.jquery.com/node/11450">http://plugins.jquery.com/node/11450</a></li>
<li>Simplified select validation, delegating to jQuery&#8217;s val() method to get the select value; should fix <a href="http://plugins.jquery.com/node/11239">http://plugins.jquery.com/node/11239</a></li>
<li>Fixed default message for digits (<a href="http://plugins.jquery.com/node/9853">http://plugins.jquery.com/node/9853</a>)</li>
<li>Fixed issue with cached remote message (<a href="http://plugins.jquery.com/node/11029">http://plugins.jquery.com/node/11029</a> and <a href="http://plugins.jquery.com/node/9351">http://plugins.jquery.com/node/9351</a>)</li>
<li>Fixed a missing semicolon in additional-methods.js (<a href="http://plugins.jquery.com/node/9233">http://plugins.jquery.com/node/9233</a>)</li>
<li>Added automatic detection of substitution parameters in messages, removing the need to provide format functions (<a href="http://plugins.jquery.com/node/11195">http://plugins.jquery.com/node/11195</a>)</li>
<li>Fixed an issue with :filled/:blank somewhat caused by Sizzle (<a href="http://plugins.jquery.com/node/11144">http://plugins.jquery.com/node/11144</a>)</li>
<li>Added an integer method to additional-methods.js (<a href="http://plugins.jquery.com/node/9612">http://plugins.jquery.com/node/9612</a>)</li>
<li>Fixed errorsFor method where the for-attribute contains characters that need escaping to be valid inside a selector (<a href="http://plugins.jquery.com/node/9611">http://plugins.jquery.com/node/9611</a>)</li>
</ul>
<p>As usual, support is available via:</p>
<ul>
<li>Please post questions to the <a href="http://groups.google.com/group/jquery-en">jQuery discussion list</a>, putting &#8220;(validate)&#8221; into the subject of your post, making it easier to spot it and respond quickly. Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in no time.</li>
<li>Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the <a href="http://plugins.jquery.com/project/issues/validate">plugins.jQuery.com bug tracker</a> (requires <a href="http://plugins.jquery.com/user/register">registration</a>).</li>
</ul>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2009/11/30/release-validation-plugin-1-6/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Release: Message plugin 1.0.0</title>
		<link>http://bassistance.de/2009/06/19/release-message-plugin-1-0-0/</link>
		<comments>http://bassistance.de/2009/06/19/release-message-plugin-1-0-0/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 09:26:34 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=524</guid>
		<description><![CDATA[I&#8217;m happy to announce the first release of the Message jQuery plugin. The plugin allows you to easily display feedback messages as an unobstrusive overlay. The message fades away automatically after some time, avoiding the need to click an “ok” button or something similar. The user can speed up hiding of the message by moving [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m happy to announce the first release of the Message jQuery plugin. The plugin allows you to easily display feedback messages as an unobstrusive overlay. The message fades away automatically after some time, avoiding the need to click an “ok” button or something similar. The user can speed up hiding of the message by moving the mouse or clicking anywhere.</p>
<p>More details can be found on <a href="http://bassistance.de/jquery-plugins/jquery-plugin-message/">the new plugin page</a>.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2009/06/19/release-message-plugin-1-0-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Release: Validation Plugin 1.5.3</title>
		<link>http://bassistance.de/2009/06/15/release-validation-plugin-153/</link>
		<comments>http://bassistance.de/2009/06/15/release-validation-plugin-153/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 15:53:20 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=508</guid>
		<description><![CDATA[An update for the jQuery validation plugin is available. Among various bugfixes there are two new localizations (Taiwan and Kazakhstan), an enhancement to $.validator.addMethod that allows you to specify (localized) messages first, the actual method later; the submitHandler-option now keeps a submit-button &#8220;alive&#8221;, that is, won&#8217;t get lost when using the option. Probably most notable: [...]]]></description>
			<content:encoded><![CDATA[<p>An update for the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery validation plugin</a> is available. Among various bugfixes there are two new localizations (Taiwan and Kazakhstan), an enhancement to $.validator.addMethod that allows you to specify (localized) messages first, the actual method later; the submitHandler-option now keeps a submit-button &#8220;alive&#8221;, that is, won&#8217;t get lost when using the option.</p>
<p>Probably most notable: <strong>The remote method now allows you to specify custom messages!</strong> Return JSON &#8220;true&#8221; for a valid field, false/null/undefined for an invalid field and the default message, or any other value to use as the message.</p>
<p>The full changelog:</p>
<ul>
<li>Fixed a bug related to the wrapper-option, where all ancestor-elements that matched the wrapper-option where selected (<a href="http://plugins.jquery.com/node/7624">http://plugins.jquery.com/node/7624</a>)</li>
<li>Updated multipart demo to use latest jQuery UI accordion</li>
<li>Added dateNL and time methods to additionalMethods.js</li>
<li>Added Traditional Chinese (Taiwan, tw) and Kazakhstan (KK) localization</li>
<li>Moved jQuery.format (fomerly String.format) to jQuery.validator.format, jQuery.format is deprecated and will be removed in 1.6 (see <a href="http://code.google.com/p/jquery-utils/issues/detail?id=15">http://code.google.com/p/jquery-utils/issues/detail?id=15</a> for details)</li>
<li>Cleaned up messages_pl.js and messages_ptbr.js (still defined messages for max/min/rangeValue, which were removed in 1.4)</li>
<li>Fixed flawed boolean logic in valid-plugin-method for multiple elements; now all elements need to be valid for a boolean-true result (<a href="http://plugins.jquery.com/node/8481">http://plugins.jquery.com/node/8481</a>)</li>
<li>Enhancement $.validator.addMethod: An undefined third message-argument won&#8217;t overwrite an existing message (<a href="http://plugins.jquery.com/node/8443">http://plugins.jquery.com/node/8443</a>)</li>
<li>Enhancement to submitHandler option: When used, click events on submit buttons are captured and the submitting button is inserted into the form before calling submitHandler, and removed afterwards; keeps submit buttons intact (<a href="http://plugins.jquery.com/node/7183">http://plugins.jquery.com/node/7183</a>)</li>
<li>Added option validClass, default &#8220;valid&#8221;, which adds that class to all valid elements, after validation (<a href="http://dev.jquery.com/ticket/2205">http://dev.jquery.com/ticket/2205</a>)</li>
<li>Added creditcardtypes method to additionalMethods.js, including tests (via <a href="http://dev.jquery.com/ticket/3635">http://dev.jquery.com/ticket/3635</a>)</li>
<li>Improved remote method to allow serverside message as a string, or true for valid, or false for invalid using the clientside defined message (<a href="http://dev.jquery.com/ticket/3807">http://dev.jquery.com/ticket/3807</a>)</li>
<li>Improved accept method to also accept a Drupal-style comma-seperated list of values (<a href="http://plugins.jquery.com/node/8580">http://plugins.jquery.com/node/8580</a>)</li>
</ul>
<p>As usual, support is available via:</p>
<ul>
<li>Please post questions to the <a href="http://groups.google.com/group/jquery-en">jQuery discussion list</a>, putting &#8220;(validate)&#8221; into the subject of your post, making it easier to spot it and respond quickly. Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in no time.</li>
<li>Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the <a href="http://plugins.jquery.com/project/issues/validate">plugins.jQuery.com bug tracker</a> (requires <a href="http://plugins.jquery.com/user/register">registration</a>).</li>
</ul>
<p>Enjoy!</p>
<p><strong>Update:</strong><br />
Just uploaded a hotfix 1.5.4 release, with a <a href="http://plugins.jquery.com/node/8658">fix for the remote method</a>.</p>
<p><strong>Update II:</strong><br />
Uploaded another release, now at 1.5.5, hopefully the final fix for the remote method: http://plugins.jquery.com/node/8659</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2009/06/15/release-validation-plugin-153/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Labs Preview: jQuery UI Photoviewer</title>
		<link>http://bassistance.de/2009/06/02/labs-preview-jquery-ui-photoviewer/</link>
		<comments>http://bassistance.de/2009/06/02/labs-preview-jquery-ui-photoviewer/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:07:23 +0000</pubDate>
		<dc:creator>Jörn</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>

		<guid isPermaLink="false">http://bassistance.de/?p=500</guid>
		<description><![CDATA[Fresh from the jQuery UI Lab comes the Photoviewer widget. As described on its planning wiki page: An alternative to Lightbox and its various clones, with the sole purpose of displaying images: One or more thumbnails point at the full resolution image, and instead of displaying that image on a new page, its displayed, above [...]]]></description>
			<content:encoded><![CDATA[<p>Fresh from the jQuery UI Lab comes the Photoviewer widget. As described on its <a href="http://wiki.jqueryui.com/Photoviewer">planning wiki page</a>:</p>
<blockquote><p>An alternative to Lightbox and its various clones, with the sole purpose of displaying images: One or more thumbnails point at the full resolution image, and instead of displaying that image on a new page, its displayed, above an overlay, on the current page.</p>
<p>When a group of anchors with thumbnails is selected, the user can navigate with mouse and keyboard to rotate through the images.</p></blockquote>
<p>The result is this:</p>
<p><iframe height="500" width="600" src="http://jquery-ui.googlecode.com/svn/branches/labs/photoviewer/demos/photoviewer/default.html"></iframe></p>
<p><em><a href="http://jquery-ui.googlecode.com/svn/branches/labs/photoviewer/demos/photoviewer/default.html">Demo</a></em></p>
<p>There&#8217;s <a href="http://jquery-ui.googlecode.com/svn/branches/labs/photoviewer/demos/photoviewer/resizing.html">another demo</a> showing how the widget can resize images that don&#8217;t fit into the browser window, as well as customizing animations.</p>
<p>Worth mentioning about the current implementation:</p>
<ul>
<li>A &#8220;canvas&#8221; element is used to render the shadow. This allows a lot of flexibility in terms of positioning, color and size of the shadow; if a browser doesn&#8217;t support canvas (IE without <a href="http://excanvas.sourceforge.net/">excanvas</a>) the shadow simply isn&#8217;t rendered</li>
<li>You can click anywhere to close the viewer, or press Escape</li>
<li>Cursor keys, mousewheel as well as mouse navigation buttons (previous/next buttons on some models) can be used to rotate through an image gallery</li>
<li>By using the mousewheel to rotate images, there is no need to emulate fixed positioning or similar hacks, though you need to include the mousewheel plugin</li>
<li>When the last image is reached, the first is displayed, and the other way round; that way its more obvious that you reached the end of a gallery (&#8220;I&#8217;ve seen that one already&#8221; instead of &#8220;Why isn&#8217;t anything happening?&#8221;)</li>
<li>A loading indicator is displayed when loading takes more then 250ms. That way you won&#8217;t see it most of the time, just in those cases where you&#8217;d otherwise wonder if anything is happening at all</li>
<li>The jQuery UI &#8220;drop&#8217;&#8221; effect is used by default to rotate images in a gallery, giving the slight illusion of a slide-projector, therefore giving the viewer a more natural/human feel</li>
<li>Images that are too big are resized to fit into the browser window; that also happens when the browser window is resized while the viewer is open</li>
<li>The markup is very simply, therefore easy to style: There is one element for the overlay (currently buggy in IE6), one container element containing the canvas-shadow element as well as the actual image (by default styled with 15px rounded white borders)</li>
</ul>
<p>I&#8217;d like to hear your feedback! Post a comment here, <a href="mailto:joern.zaefferer+photoviewer@gmail.com">send me an email</a>, or participate on the <a href="http://wiki.jqueryui.com/Photoviewer">planning wiki page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bassistance.de/2009/06/02/labs-preview-jquery-ui-photoviewer/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
