Source
........
Use selectors. Think in sets.
In the ASP.NET world, it’s rare to select sets of controls through queries. Instead, we’re accustomed to referencing a single control by its unique ID. Of course this is possible in jQuery too, but its selector engine is far more sophisticated.
Using selectors to identify a set of one or more elements is cleaner and more expressive than the iterative machinations you may be used to in ASP.NET server-side code. Before parsing out an ID or iterating over a group of elements in search of certain ones, be sure that the task isn’t more easily accomplished through a jQuery selector.
Use CSS classes for more than just styling.
Another technique that is counterintuitive at first is the use of CSS classes as flags. Coupled with jQuery’s selector engine, “flag” classes are surprisingly powerful.
............
Friday, June 12, 2009
Thursday, June 11, 2009
Two definitions for Lambda expression
a term in the lambda-calculus denoting an unnamed function (a "lambda abstraction"), a variable or a constant. the pure lambda-calculus has only functions and no constants.
A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
Friday, June 5, 2009
undefined and null are same in Javascript with sample code
undefined is a global property (variable) with a constant value. Javascript treats undefined as being equal to null.
Sample code
<html>
<body>
<script type="text/javascript">
var test;
if (test==null)
{
alert("null");
}
if (test==undefined)
{
alert("undefined");
}
</script>
</body>
</html>
Sample code
<html>
<body>
<script type="text/javascript">
var test;
if (test==null)
{
alert("null");
}
if (test==undefined)
{
alert("undefined");
}
</script>
</body>
</html>
Thursday, June 4, 2009
Subscribe to:
Posts (Atom)