background preloader

Javascript

Facebook Twitter

A jQuery inline form validation, because validation is a mess « When it comes to form validation, it’s hard to have a versatile solution that works with every form.

A jQuery inline form validation, because validation is a mess «

Figuring out how to display errors is not a simple task. This is something I tried to remedy with this script. When an error needs to be displayed, the script creates a div and positions it in the top right corner of the input. This way you don’t have to worry about your HTML form structure. The rounded corner and shadow are done with CSS3 and degrade well in non compliant browsers.

Download the source code View demo Validations range from email, phone, url to more complex calls such as ajax processing. **Important**: v2 is a significant rewrite of the original 1.7 branch. Legacy 1.7 documentation and download can be found under package when you hit download on github Installation.

Modernizr. 15 Powerful jQuery Tips and Tricks for Developers. Martin Angelov In this article we will take a look at 15 jQuery techniques which will be useful for your effective use of the library.

15 Powerful jQuery Tips and Tricks for Developers

We will start with a few tips about performance and continue with short introductions to some of the library’s more obscure features. 1) Use the Latest Version of jQuery With all the innovation taking place in the jQuery project, one of the easiest ways to improve the performance of your web site is to simply use the latest version of jQuery. Every release of the library introduces optimizations and bug fixes, and most of the time upgrading involves only changing a script tag.

You can even include jQuery directly from Google’s servers, which provide free CDN hosting for a number of JavaScript libraries. The latter example will include the latest 1.6.x version automatically as it becomes available, but as pointed out on css-tricks, it is cached only for an hour, so you better not use it in production environments. 2) Keep Selectors Simple 7) Use CSS Hooks.

Fathom.js. If you're making a presentation on JavaScript, make it in Javascript.

Fathom.js

Write your slideshow in HTML, style it with CSS and control it with some jQuery-powered JavaScript. When you're done, Fathom.js even lets you sync the video of your presentation quickly and easily. Fathom.js comes with mouse, keyboard and scroll bar navigation built in and provides a simple API for creating your own custom interfaces. Les librairies JavaScript vraiment utiles. JSTweener JSTweener est une librairie de gestion des transitions (tween en anglais) basé sur la classe Tweener utilisée dans le code ActionScript de Flash.

Les librairies JavaScript vraiment utiles

$fx() - JavaScript Animation Library $fx() est une librairie JavaScript légère (moins de 4Ko) d'animation d'éléments HTML. Elle vous permet de modifier n'importe qu'elle propriété CSS progressivement avec un paramétrage simple. Vous pouvez aussi combiner les effets en les enchainant ou en les synchronisant. Facebook Animation Cette librairie vous offre beaucoup de possibilités pour améliorer leur page Facebook avec juste une ou deux lignes de code. Autres librairies : FX, Animator.js, jsAnim SoundManager SoundManager importe et améliore l'API Sound de Flash et la rend disponible en JavaScript. Peity - Créez des minis graphes dynamiques avec du HTML5 Canvas.

Peity est une librairie jQuery permettant de créer facilement des graphes de petites tailles, spécialements conçus pour être intégrés dans vos paragraphes de texte.

Peity - Créez des minis graphes dynamiques avec du HTML5 Canvas

Pratique si vous souhaitez mettre en place des représentations visuelles de notes, de pourcentages ... directement dans vos paragraphes de texte. La librairie est très simple à utiliser, comme la plupart des plugins jQuery, il vous suffit de quelques lignes de code Javascript et HTML pour transformer vos notes / pourcentages en graphes: 1. <span class="pie">1/5</span> Apprise - The attractive alert alternative for jQuery. The initial release of Apprise has been a major success and is often what this site is most commonly associated with.

Apprise - The attractive alert alternative for jQuery

As far as I've been able to track, Apprise has been downloaded over 23,000 times and has been mentioned in over 46,000 blogs. Which is fantastic, especially for something that I've never been very proud of. I've wanted to update, and change the UI, of this for over a year now. Time has finally permitted and it's, finally, ready. Demos Let's get right down to business. Pretty slick, right? Let's take a peak at the default settings before we change the options around a bit. You'll notice that the buttons are completely customizable and can easily be altered using your own CSS rules. Let's try another demo, but changing the settings around a bit. We're going to use a custom CSS class on our confirm button. You'll see the custom blue button with it's custom text, as well as a goofy little callback function that populates the field below: Response: Using.