Results 1 to 7 of 7

Thread: New features in jQuery 1.4.3

  1. #1
    Join Date
    Jul 2010
    Posts
    75

    New features in jQuery 1.4.3

    CSS Engine - The engine inside a jQuery involving the handling of the attributes of style has been completely rewritten to improve not only performance but also the exposed functionality. You first need to specify that there are two different strategies to access information and writing style elements: the method style and method css. The first method allows you to access and modify the properties as if they were acting directly on the page style sheet, while the second method operates on the property so therefore allows one to create "new attributes" and take advantage of this facility. Is quoted in the official plugin jQuery Rotate as an excellent example that uses this technique to exploit the "fake" property css rotate it this way:
    $ ('# MyDiv'). Css ('rotate', 90);

  2. #2
    Join Date
    Jul 2010
    Posts
    75

    Re: New features in jQuery 1.4.3

    Obviously all the rules that apply to the method of css are valid for the animated method internally does nothing but call the method several times above. Besides this, the overall performance of the engine are greatly improved: we talk about a speed increase of 20%.

    HTML Attributes and Metadata - The plugin jQuery Metadata has been included by default in the library and through it you can now pre-populate the object data from a series of HTML attributes (which, mind you, not make a good your HTML syntax checker). Taking a cue from the official site here is a small example:
    Code:
    <div data-role="page" data-hidden="true" data-options='{"name":"Sunil"}'> </ div>
     $ ("Div"). Date ("role") === "page"; 
     $ ("Div"). Date ("hidden") === true; 
     $ ("Div"). Date ("options"). === Name "Sunil";
    We can see that using the prefix "data-" attributes in HTML we can use this new feature. Attribute values are converted to the corresponding value (for example, a JavaScript object as in the case of options).

  3. #3
    Join Date
    Jul 2010
    Posts
    75

    Re: New features in jQuery 1.4.3

    New Events - In addition to the existing events setData and getData , the new version of the library introduces a new event: changeData . It allows you to assign a function to a particular object so that it is invoked whenever any property of the object is altered.

    Date and JavaScript objects - Has been improved management of the component data when used on generic JavaScript objects that are not present in any node HTML page. Any attributes set by the method data() are now "hung" directly to the parent object. Also, now, passing an object as an attribute of the JavaScript function will be possible to extend the current object with the new attributes in the subject parameter (with earlier versions of the original object was completely "replaced" by new values).

    Traversing - The whole module has been improved in terms of performance by using, where possible, native methods querySelectorAll and matchesSelector implemented in major browsers (Internet Explorer obviously excluded).

    Ajax - Two new, far less significant than those introduced here, are also present in the Ajax component. You have defined a new property readyWait to delay the execution of the event ready in case of special behavior of our script and was introduced to support property jQuery.support.ajax that specifies (in optical feature detection) if the current browser is able to make Ajax calls.

  4. #4
    Join Date
    Feb 2010
    Posts
    524

    Re: New features in jQuery 1.4.3

    Here are some small new features included:
    • passing false as the second parameter of the bind you can avoid the default behavior without forcing event.preventDefault;
    • all built-in events (like click ) accept an object as a parameter to be passed later to the callback function (functionality already exists for the method bind() );
    • the event object acquires the property namespace to identify the nature of the event triggered.
    Even for this two small changes:
    • all methods now support the animation effect "easing" as previously happened to the only method animate() ;
    • new property ( jQuery.fx.interval ) to determine the frequency of the animation (defaults to 13).

  5. #5
    Join Date
    Feb 2010
    Posts
    616

    Re: New features in jQuery 1.4.3

    Two additional developments available as static methods jQuery object. Thank jQuery.type is possible to analyze the nature of a particular object useful when we need to use reflection to change the behavior of such a function based on the received parameters. The method returns a string that identifies the type of data analyzed. The latest is the function jQuery.isWindow to determine if the object passed as a parameter represents the implicit window. In addition to the release of a few days ago, the last period there have been no further news important enough in the jQuery community official. In particular they have been issued a set of plugins directly operated and maintained by the team of developers of the framework that can be integrated just as third-party plugins. The main change, however, is that the development of these has also collaborated Microsoft.
    • jQuery Templates (to exploit the potential of the technique of templating);
    • jQuery Data Link (for data synchronization in page);
    • jQuery Globalization (Globalization).
    The first of these will be integrated with version 1.5 in jQuery Core and the third will arrive shortly on jQuery UI project to provide custom widgets based on the language settings of the client.

  6. #6
    Join Date
    Apr 2009
    Posts
    49

    Re: New features in jQuery 1.4.3

    The plugin allows to use the technique of the template, or to facilitate the creation of complex graphical structures, creating precisely the template "generic" which are then compiled from JavaScript objects or arrays and hung in the next page. The definition of a template is inside a tag <script> marked with the type -specific text/x-jquery?tmpl and is treated as a normal object jQuery. Here is a small example taken from the official documentation of the plugin:
    Code:
    <script id="cinemaTemplate" type="text/x-jquery-tmpl"> 
     <li> <b> {$ Name} </ b> ($ {ReleaseYear}) </ li>
     </ Script>
     <script type="text/javascript"> 
    	 var cinema = [
    		 {Name: "Narnia", ReleaseYear: "2006"}, 
    		 {Name: "Spiderman 3", ReleaseYear: "2007"}, 
    		 {Name: "Resident Evil 4" ReleaseYear: "2010"}
    	 ];
    	 / / Render the template with the date and insert cinema 
    	 / / The HTML rendered under the "cinemaList" element 
    	 $ ("# CinemaTemplate). Tmpl (cinema). AppendTo (" # cinemaList ");
     </ Script> 
    
     <ul id="cinemaList"> </ ul>
    This example creates a simple template (an element <li> with a particular label), which is then populated from an array and is hung in a <ul> already created page and retrieved via the id. One approach would not only facilitate the writing of the code (thus avoiding the creation of classical strings with concatenated values) but also the maintainability and elegance.

  7. #7
    Join Date
    Feb 2009
    Posts
    71

    Re: New features in jQuery 1.4.3

    I would like to discuss about the jQuery Data Link. The plugin allows you to create a relationship between a particular JavaScript object and a set of page elements that can show its value. This link provides an update of various "access points" only once by changing the value of the object. This plugin is very easy to transform an element <form> in a JavaScript object containing a set of properties from elements present in the input page also ensuring data synchronization automatically. The creation of this report it is highly customizable: you can for example introduce ad hoc conversion functions for each field, forcing one-way or two-way relationship based on need and customize the field mappings. Globalization is a jQuery plugin that allows the web programmer to abstract from issues related to the internationalization of their applications based on the language settings of the machine or to provide interfaces that allow to adapt dynamically to any changes to that language. Everything starts from the concept of "culture". With it, identifies a set of rules and conventions that alter the set of labels included in an application. They are part of the culture, for example, the format of dates or numbers, the use of a particular symbol for the currency and of course the language of the labels present in the static page.

Similar Threads

  1. Jquery or Perl
    By CLONE in forum Software Development
    Replies: 1
    Last Post: 13-05-2010, 01:30 AM
  2. Is jQuery is best Js frameworks
    By Aashirya in forum Software Development
    Replies: 5
    Last Post: 11-02-2010, 01:38 AM
  3. jQuery and several events
    By AZUL in forum Software Development
    Replies: 3
    Last Post: 28-09-2009, 04:19 PM
  4. Manipulate jQuery with PHP
    By Zecho in forum Software Development
    Replies: 5
    Last Post: 16-06-2009, 02:14 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,019,117.68656 seconds with 17 queries