Web Info & Tutorials

January 15th, 2007

JQUERY 1.1 IS REBORN ON ITS FIRST BIRTHDAY

John Resig and team have released jQuery 1.1 which includes a speed upgrade, an updated API, a new homepage, and new documentation including a book in the works.

The community seems to be growing from strength to strength.

New Features

  • By all of our counts, jQuery 1.1’s selectors are 10x-20x faster than those in jQuery 1.0.4. This should provide a noticable difference in your jQuery applications.
  • Common selectors like div#id, div .class, td:nth-child(1), and div > div are all significantly faster. It’s a complete world of difference. Try them out and you’ll see.
  • You can now pass in a function as a value for an attribute or a css property. The function is executed and its return value is set as the value for the property. For example:
    // 1.0 Code
    $(\"a\").each(function(){
        $(this).attr(\"href\", \"/item/\" + this.id);
    }).show();
    	
    // 1.1 Code
    $(\"a\").attr(\"href\", function(){ return \"/item/\" + this.id; }).show();
  • You can now unbind an event handler from within itself. This allows you to have event handlers that are only bound for a specific number of executions, for example:
    $(\"button\").click(function(e){
        // Unbind the event handler if a specific form is hidden
        if ( $(\"#submitForm\").is(\":hidden\") ) {
            $(this).unbind( e );
        }
    });
  • Easily bind an event that will only occur once (this replaces the old .oneclick() functionality):
    // Show a thank you message for a form submission, but only once
    $(\"form\").one(\"submit\",function(){
        $(\"#thankyou\").show();
    });
  • You can now set the text value of an element (this is different from .html(), where in .text() all HTML is displayed as text).
    $(\"pre\").text(\"<b>Hello</b>, how are you?\");
    	
    // Result:
    <pre>&lt;b&gt;Hello&lt;/b&gt;, how are you?</pre>
  • You can now build your own filters, using a custom function. (This was in 1.0, but it wasn’t documented very well.)
    // Find all divs whose parent isn't hidden
    $(\"div\").filter(function(){
      return $(this).parent(\":hidden\").length > 0;
    });
  • You can now pass a comma-separated list of selectors to the following filter functions:
    filter, find, not, siblings, parents, children, next, prev. This allows you to do some very cool stuff:

    // Find all radio buttons, or checkboxes, in a form
    $(\"form input\").filter(\":radio, :checkbox\");
    	
    // Find the next element that's a span, or a div
    $(this).next(\"span, div\");
January 15th, 2007

WEEBLY: ONLINE WEBSITE CREATION TOOL USING AJAX

David Rusenko told us most his creation Weebly, a scheme place creation programme cursive with rich amounts of Ajax utilizing an cushy to ingest inspire and modify interface.

We’re disagreeable to attain a agency that’s cushy sufficiency for the eld of scheme users to use, and guides the individual towards creating a rank willing scheme place (not meet an online word doc).

Weebly is today funded, has touched to the niche area, and we should wait whatever engrossing programme reaching discover from them soon.

Check discover the recording below, which tells the news meliorate than a some text here. This is the stylish of a ordered of tools that intend to intend the cipher joe to a saucer where they crapper hit a wysiwyg website redaction experience.