Now it is time for Christmas and if you want to add some snows to a picture like the below example, a cool jQuery plugin — created by Jason Brown — can come to help.
I know quite a few JavaScript MVC frameworks out there but corMVC is what makes me exited at most for a few reasons.
corMVC stands for “client-only-required” Model-View-Controller and that means it does not depend on specific server-side technology. In case you want to demo something, it would be perfect if everything can be done on client side. Of course, you can save changes or load data from server (via Model) as the general illustration below.
Not like other JavaScript MVC solutions, corMVC is very simple and has very small footprint. It also does not require you to build the application using scaffolding or any other command-line utilities.
Installation
FireQuery is an extension of Firebug created by BinaryAge to help developers to keep track with jQuery expressions, data and collections as expressed on tool website:
- Query expressions are intelligently presented in Firebug Console and DOM inspector
- attached jQuery data are first class citizens
- elements in jQuery collections are highlighted on hover
- jQuerify: enables you to inject jQuery into any web page
You can install the tool from official Mozilla add-on page (it requires Firebug 1.3+ already existed.) One note: You may have to find an older version (v0.3) to make it work with current official Firebug release (v1.4) as my experience on Windows.
In Action
After installing the add-on and restarting Firefox, just go to the test page to see how FireQuery tracks embedded jQuery data on FireBug’s “HTML” tab. The image below illustrates the data embedded in accordance with the jQuery codes to inject them to the page.
JavaScript code content assistance built in Eclipse WTP does very good job that I found even better than the same functionality in some commercial solutions, however, jQuery’s syntax is not supported (no surprise). That’s why jQueryWTP tool comes to help adding jQuery support to Eclipse WTP (and Eclipse PDT, MyEclipse which are based on WTP too.)
This is not an Eclipse plugin instead a tool to patch the existing plugin and inject jQuery’s syntax support into it. First download the tool from SourceForce; it’s a Java executable JAR so you can double-click to it or run it from command line:
java -jar jqueryWTP0.2forJQuery1.2.6.jarNow browse to plugin file
org.eclipse.wst.javascript.ui_xxxxxxx.jar
and set output directory to generate the patch. Please backup the original file and set output directory different from source one.

Select “Generate” button to get the patched file then copy over original file. Start Eclipse and open a HTML or script file to see jQuery’s functions listed on code assistance like image below.
Here are some quick and useful jQuery plugins from Jason Frame’s “jQuery Grab Bag“.
Auto-Grow TextArea
The technique is borrowed from Facebook that uses an off-screen <div> to calculate the required dimensions of the textarea to reveal all texts inside instead of to display vertical scrollbar. Run the following code line to enable auto-grow behavior to all textareas on page.
$('textarea').autogrow();
Online Demo
Input Hint
It’s not always necessary to attach label to every text field in web form, instead you can use hint to tell user what to type in the fields. This plugin will help keeping away from tedious codes to add hints to input boxes.
First, add hint attribute to input fields.
The negative side of having a new (and promisingly become popular) browser, no matter how good it can be, is you’ll have to test your web apps with it among many others.
Probably, the first step is to detect the browser from JavaScript code by parsing browser’s user agent, and here is what of Google Chrome.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13
I guess old JavaScript codes can mistakenly tell it Safari like when running the code snippet below using JQuery’s browser utility.
1 2 3 4 | $.each($.browser, function(i, val) { $("<div>" + i + " : <span>" + val + "</span></div>") .appendTo(document.body); }); |

It may be no problem until you find something wrong when your apps running on Chrome only. So, here is the code line to detect Chrome generally:
1 | var is_chrome = /chrome/.test( navigator.userAgent.toLowerCase() ); |
We’ll have to change the JQuery browser utility to support Chrome detection as follows:
1 2 3 4 5 6 7 8 9 10 11 | var userAgent = navigator.userAgent.toLowerCase(); // Figure out what browser is being used jQuery.browser = { version: (userAgent.match( /.+(?:rv|it|ra|ie|me)[\/: ]([\d.]+)/ ) || [])[1], chrome: /chrome/.test( userAgent ), safari: /webkit/.test( userAgent ) && !/chrome/.test( userAgent ), opera: /opera/.test( userAgent ), msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ), mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) }; |
Now, correct result shows on test screen:

Just one notice: Current version of JQuery (1.2.6) is treating Chrome as if it was Safari and basically no serious problem has been found yet. Modifying browser detection can cause the lib render pages/elements incorrectly for it has no knowledge of Chrome’s rendering engine. To keep compatibility, you can change line 7 back to:
7 | safari: /webkit/.test( userAgent ), |
The redesign of JQuery DOT COM site recently gained a huge amount of comments; unfortunately most of them were not positive. Developers who have come along with the library feel unhappy with new slogan “Be a Javascript Rockstar” that, said, makes them look unprofessional.

Response to a post on Ajaxian, shypht commented:
Hate to say it, but image is everything. If I was trying to sell my manager on using jQuery, Prototype, Mootools or Dojo, and sent them to those sites, I think based on look alone jQuery would be at a disadvantage. “Write less, do more” is a great slogan, “Be a Javascript Rockstar”, not so much.
Strikes me as being an amateur, and more focused on flashy effects than functionality. I love jQuery, it’s helped me loads on my most recent project, but that header just makes me cringe a bit on the inside when I see it.
While Glen Lipka described his feeling in more colorful words on his blog post:
Truthfully, I feel alienated by it. It doesn’t resonate with me. It makes me feel old and lame. My hair is not long and flowing. The rockstar isn’t me. jQuery is me. It’s different.
Obviously John Resig & team did listen to the community and decided to kill the “JavaScript RockStar” on JQuery site.






0