background preloader

TinySort

TinySort

Script Junkie | Creating Responsive Applications Using jQuery Deferred and Promises Today we’re going to explore the concept of deferreds - an important feature found in JavaScript toolkits such as dojo and MochiKit, which recently also made its debut to popular JavaScript library jQuery. Deferreds offer a solution for abstracting non-blocking elements (such as the response to ajax requests) and achieve this by creating a ‘promise’ which aims to return a response at some point in the future. If you haven’t come across the concept of ‘promises’ before, we'll be covering them in some detail shortly. At a high-level, deferreds can be thought of as a way to represent costly operations which can take a long time to complete. Promises Some of the material you may read on promises and deferreds may focus on quite implementation-specific applications of it. In its most basic form, a ‘promise’ is a model that provides a solution for the concept of deferred (or future) results in software engineering. promise = callToAPI( arg1, arg2, ...) jQuery Deferreds Further Deferreds examples

Le framework JavaScript ExtJS est disponible en version Version 4 ExtJS est disponible en version Version 4.0.0 depuis le 26 Avril 2011. C'est une étape Majeure dans l'évolution de la librairie. outre les habituelle nouveauté côté composant le changement Majeur de cette version est la refonte du modèle Objet, l'introduction du chargement dynamique des composant et classe js, le support intégré de MVC Code : la liste des nouveauté est longue. parmi les nouveau composant on peut noter la présence de chart et draw qui sont les plus visibles. mais aussi Sandboxing et zindexManager pour une liste plus complète la documentation à évolué avec un index mieux conçu et des articles plus complet

Date Range Picker using jQuery UI 1.7 and jQuery UI CSS Framework Posted by Scott on 01/05/2009 Topics: css jQuery ui design visual design We've updated our popular Date Range Picker plugin to use jQuery UI 1.7 and the new jQuery UI CSS Framework. Working Demo: Demo Page The demo above was generated with the following code: jQuery: $('input').daterangepicker(); An additional demo with arrows and a custom dateFormat: Demo Page Features and Updates Uses jQuery UI 1.7.1: The range picker now uses the latest version of jQuery UI's datepicker, and allows passing of native datepicker options. jQuery UI CSS Framework-Driven: Our range picker uses jQuery UI CSS Framework classes, making it ThemeRoller-Ready. Download (and help us improve) the code The date range picker plugin code is open source and available in a git repository, jQuery-UI-Date-Range-Picker. Developer Options The following options are available in this plugin: Development Notes This plugin is a work-in-progress, and we would love to hear your input on how it could be improved. Dependencies Setting Menu Presets

WinJS.Promise object Provides a mechanism to schedule work to be done on a value that has not yet been computed. It is an abstraction for managing interactions with asynchronous APIs. For more information about asynchronous programming, see Asynchronous programming. For more information about promises in JavaScript, see Asynchronous programming in JavaScript. Syntax var aPromise = new WinJS.Promise(init, onCancel); Members The Promise object has these types of members: Constructors The Promise object has these constructors. Events The Promise object has these events. Methods The Promise object has these methods. Requirements

JSON jQuery : la version 1.6 du framework JavaScript disponible mais pas rétrocompatible, réécriture majeure de la méthode attr() jQuery 1.6 est disponibleMais pas rétrocompatible, réécriture majeure de la méthode attr() Pour utiliser cette version, il suffit d'inclure un appel au serveur de code jQuery dans votre page web : <script charset="utf-8" src=" Voir : Comment installer la bibliothèque jQuery ? En général, l'équipe de développement travaille de manière à conserver la compatibilité avec les anciennes versions, cela n'a pas été possible cette fois-ci. Vous devrez contrôler tous vos scripts avant d'utiliser la version 1.6 en production. La version 1.6 comprend une réécriture majeure de la méthode attr() et une modification importante dans l'écriture des attributs HTML5 data-XYZ pour tenir compte des recommandations du W3C. Les méthodes attr() et prop() Avant la version 1.6, jQuery ne faisait pas la distinction entre propriété et attribut et gérait le tout avec la méthode attr(). attr('checked') représente l'état de l'élément lors de la création du DOM. Code :

25 jQuery Slider/Image Gallery Tutorials and Plugins This post was originally published several years ago. As technology and trends have changed over the years, the content of the post became outdated. So we’ve updated the post with all new examples that will be more relevant for modern design and development. jQuery image galleries and sliders are very common on portfolio sites and are also useful for any other type of site for displaying images and photos. Fortunately, adding a jQuery gallery does not have to be difficult, even if you don’t have much experience with JavaScript and jQuery. In this post we’ll see tutorials and plugins that can provide you with the resources that you need to get a gallery of slider on your site. jQuery Image Gallery/Slider Tutorials: Create an Image Rotator with Description (CSS/jQuery) This tutorial by Jake Rocheleau is a re-make of a popular tutorial originally written by Soh Tanaka. How to Create a Simple Multi-Item Slider Triple Panel Image Slider Building a jQuery Slideshow Plugin from Scratch Gamma Gallery

tomhuda-metamorph.js spin.js CoffeeScript CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way. The golden rule of CoffeeScript is: “It’s just JavaScript”. The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. The CoffeeScript compiler goes to great lengths to generate output JavaScript that runs in every JavaScript runtime, but there are exceptions. Latest Version: 1.12.5 npm install -g coffee-script CoffeeScript 2 is coming! Overview CoffeeScript on the left, compiled JavaScript output on the right. number = 42 opposite = true number = -42 if opposite square = (x) -> x * x list = [1, 2, 3, 4, 5] math = root: Math.sqrt square: square cube: (x) -> x * square x race = (winner, runners...) -> print winner, runners alert "I knew it!" run: cubes Installation npm install --global coffee-script Usage Examples: Functions load

» Jquery Wizard Plugin » Worcester Web Site Development Blog After looking for a jquery plugin that will emulate a windows wizard I decided to make my own (with the help of cody lindley’s css step menu). I am using Jquery which can be found here and css step menu found here. The code: First we need a simple javascript function will hide and display a div, this method is used with jquery and you can learn how to use this here function loadnext(divout,divin){$("." + divout).hide();$("." + divin).fadeIn("slow");} Next the html code, notice how each step is wrapped in the ID wizardwrapper and each div is assigned a class for the corresponding step number. Step 1 Step 1: XXXXXXXXEt nequ a quam turpis duisi Step 2: XXXXXXXXEt nequ a quam turpis duisi Step 3: XXXXXXXXEt nequ a quam turpis duisi Step 4: XXXXXXXXEt nequ a quam turpis duisiStep 5: XXXXXXXX Et nequ a quam turpis duisi Step 2 Step 3 Step 4 Step 5 A Demo of the wizard

Related: