Jun 28th, 2009 | 1 Comment

These days almost every site uses JQuery. It makes your life so easy. There is this another Javascript library called JQuery Tools that is coming up as competitor for JQuery UI. Here is the link to the JQuery Tool http://flowplayer.org/tools/demos/index.html.

But the question, for which I am searching the answer is,
Can JQuery Tools really compete with JQuery UI? And who would answer this question better then you guys.

So what you guys think, JQuery Tools Vs JQuery UI, who wins?

I look forward for hearing your thoughts on this. As this may help others to decide what should they go from either of these

Written by Ajay Matharu

June 28th, 2009 at 1:39 pm

May 18th, 2009 | 1 Comment

A big part of the appeal of jQuery is that it allows you to elegantly (and efficiently) find and manipulate HTML elements with minimum lines of code.  jQuery supports this via a nice “selector” API that allows developers to query for HTML elements, and then apply “commands” to them.  One of the characteristics of jQuery commands is that they can be “chained” together – so that the result of one command can feed into another.  jQuery also includes a built-in set of animation APIs that can be used as commands.  The combination allows you to do some really cool things with only a few keystrokes.

For example, the below JavaScript uses jQuery to find all <div> elements within a page that have a CSS class of “product”, and then animate them to slowly disappear:

$("div.product").slideUp('slow').addClass("removed");

As another example, the JavaScript below uses jQuery to find a specific <table> on the page with an id of “datagrid1″, then retrieves every other <tr> row within the datagrid, and sets those <tr> elements to have a CSS class of “even” – which could be used to alternate the background color of each row:

$("#datagrid1 tr:nth-child(even)").addClass("even");

The jQuery library also works well on the same page with ASP.NET AJAX and the ASP.NET AJAX Control Toolkit.

Visual Studio figures out external script references, such as to JQuery, by following special reference comments it finds at the top of .js files:

/// <reference path="jquery-1.2.3.js" />

You can download the JQuery from here. You can get more details on JQuery from http://jquery.com/ .

For intellisense support for JQuery you need to install this Hotfix.

Comment for javascript is written inside for intellisense support. JavaScript has the interesting feature that calling toString on a function returns the code of this function including the comments and thus the doc comments. Here’s a similar example in JavaScript where the documentation is written inside of a class constructor:

Another difference with C# or VB.NET is that property and event accessors are two different entities in JavaScript. For this reason, to choose where the documentation should be for those members. Properties should be documented in the getter and events in the “adder” for this reason:

Written by Ajay Matharu

May 18th, 2009 at 12:00 am

Page 3 of 512345