21 functions Javascript for the integrator web-based (and to come more…)

The Javascript libraries - as and the myriad of plugins which accompanies it - facilitate the life of the web developers while enabling them to handle the DOM the hands in the crucibles. However, it is always good to have some functions under the mouse to facilitate integration cross-country race-browser! Here a selection of 21 scripts to face all the situations (or almost):

  1. - this function written by John , at the origin of , gained the contest . It quite simply makes it possible to attach a function to an event (, , , etc):

     (, type, ) {
        yew  {
             ['] = ;
             [] =   { ['] ;}
             (',  []);
        } 
             (standard, , );
    }
    

    In premium account, here the opposite function, if:

     (, type, ) {
        yew  {
             (',  []);
             [] = no one;
        } 
             (standard, , );
    }
    

    Some examples of use:

     ( (“”), “”, );
     (, “”,   { (“! ”); });
     (, “”, );
    

    The last example is ideal to launch a function to the page load without intrusion in the HTML code!

  2. - Already referred to here, this superb function which selects the elements by their class was upgraded recently.

    (” information-links”); - all elements having a class information-links,

    (” neck”, “”, (” container”)); - all the elements contained in and having the class neck,

    (” grips grip-me me”); - all the elements with the classes grip-me and grips me.

  3. - the function questions the DOM via the selectors 1 and 2 and part of 3. Alternative to to reach the components of the DOM some is the navigator!

    VAr = (“ > ”); select all the downward beacons directly of ,

    images = (“”, ); give the list of the beacons present in the variable seen higher,

    Guess-therefore what VAr gives = “: [] ”; :)

    While we are at , profit to test intelligent a Javascript minicomputer-framework (it is Yves which says it on ).

  4. - This Javascript class simplifies the use of the purpose. She proposes several methods to manage the data to be sent in background. In other words, makes it possible to apprehend easily. Many functional examples available.

  5. pull-down menu - rewriting of very popular to implement pull-down menus on several levels. This script of 12 lines creates a class on an element Li to emulate the pseudo-class: for Internet Explorer which does not implement it in particular that on the anchors has.

    Leger, accessible, based on the style sheets and not-intrusive (with share in the style sheet itself since the selector Li should be doubled: with the class ).

  6. - If preceding script rained you, you are ripe to pass high speed with this set of functions derived from to emulate the pseudo-classes: : x-ray: active and: on the HTML element which you want:

    (, “LI”, “VOR”); to implement: on an element Li placed in .

    (, “INPUT”); to give the x-ray one to the elements input.

  7. - This not-intrusive script transforms a list of links into an effective system of menu with miters with several menus on the same page; the possibility of establishing a link towards a miter and the installation of links according to and precedent to reach the miters. See my comparative between and more.

  8. - astute Script to balance columns between them! This script is not-intrusive: the identifiers of the blocks to be balanced are placed in the heading of script and it is degraded harmoniously if Javascript is not activated on the navigator.

  9. - This component manages the majority of the stresses related to the absence of assumption of responsibility of the transparency 24 bits by Internet Explorer 6. Only script to my knowledge to deal with the properties background-repeat and background-position with version 2.0 Alpha 3

    Notes: keep an eye on of Yves Van !

    See the on the transparency of the png 24 bits on IE6 for more information.

  10. - very light Script to insert an Flash animation in your Web page with one alone line of code:

     " /Javascript " >
         (“flash-content”,”  ", “flash-element-id”, 800,200);
    
    

    In option: possibility of specifying the necessary version of Flash or of adding parameters to your Flash animation.

  11. - To change a class with the flight. Found on this excellent item of on the use of Javascript (and for the majority of the solutions) to fix 12 problems involved in the navigators. Via .

     (, ) {
        VAr elements =  (“*”);
         (I = 0; I < ; ) {
            yew (elements [I]  == ) elements [I]  = ;
        }
    }
    
     " short prop "  "  "  "  (“show”, “”); ”/>
    
  12. negotiable instruments without - the opening of “new windows” leaves little by little the place to the negotiable instruments. Here thus several simple solutions and effective to carry out a to forward images, dynamic contents, a form with negotiable instrument of fading while obscuring the remainder of the page. Without , with some lines of code. Scripts tested with Internet Explorer, Firefox, Chromium, Opera, Safari and Konqueror.

  13. 9 Javascript not to be missed - to select or of a click; to open a window pop-up; to have several buttons for a form; to emulate the button return of the navigator; to fill the securities of a menu according to the choices carried out with a small first, etc

Here for the first 21 functions. As the web-based is vast and that it never stops, this list will lengthen with the current with other quite interesting scripts;)

  1. - Propose alternate style sheets with the visitors.

  2. - To emulate the property max-width for IE6:

    .
     = ;
      {
        VAr container =  (“container”);
         = ( > 1100)? “1100px”: “car”;
    }
    
  3. To simplify the access to the identifiers with the manner of (via ):

     $ (element) { 
         (element); 
    }
    
  4. - This library proposes foundations to facilitate your developments: to find the elements with the same identifier or the same class; to launch a function when the DOM is ready; to add or remove a class with an element; to add or remove an event handler , etc All that, for in version only compressed!

  5. - This library goes a little further and makes it possible to handle the DOM with more flexibility for launching functions on a whole of element for example. Support selectors 1, 2 and 3.

    $ (“ input []”);
    
    $ (“ has”)  (“”, );
    
    $ (“”)  (“”);
    

    Icing on the cake, this library is modular and. The ? Less than in compressed version.

  6. - light Version of without to make menus with miters starting from simple lists.

  7. - complex dynamic Lists to carry out a menu with a behavior similar to of Mac OS X: a click on an element displays a column at side for the sub-menu, and so on. By the brilliant one and prolific !

  8. Modern with Javascript - Good, to do without the like , it is well, but I nevertheless propose to you this list impressive of 47 scripts, functions or plugins (, , , etc) to improve the end-user experience;)

Conclusion

Even it is not a question itself of a “coherent” whole of function in the direction where certain scripts have redundant functionalities, these functions should find a place in your library. I made the impasse on the but my opinion is made for a long time: Prototype or gave again its noble letters with Javascript.

: , ,
Published on November 19th, 2008 by Bruno .


Ca can interest you”


3 participations in the item

  1. 1 Franck spoke on November 19th, 2008 with 09:56 |
     

    Well with the heat in my .

  2.  
    2 Florent V. spoke on November 19th, 2008 with 16:27 |
     

    I make my market for my . :)

  3.  
    3 Florent V. spoke on November 20th, 2008 with 10:25 |
     

    And I see that you make your market in return . : D

3

  1. By | taggle.org on November 20th, 2008 with 09:31

    [...] 21 functions Javascript for integration, compiled by Bruno [...]

  2. [...] : Comments on 21 functions Javascript for the integrator web-based (and to come more…) (In… Related ArticlesBookmarksTags Release history 1 0 1 0 0 9975 07 07 Officially called [...]

  3. By Review of web-based week 47 | ::: The on November 23rd, 2008 with 15:12

    [...] hands in the sludge with the smile 21 functions Javascript for the integrator web-based (and to come more…) - [...]

Take part in the item

Your email never will not be published or will be revealed.

Enrich your comment with syntax.

To follow the comments of this bank note by RSS?