Visitez notre nouveau projet: Wibe7 TV

Archive pour la catégorie 'Javascript'

Shadowbox, une alternative à lightbox

écrit par Dominic Martineau le février 1, 2008

Shadowbox est un “media viewer”. Comme lightbox, il vous permet de regarder des images sans changer de page. En plus des images, il vous permet de jouer des objets flash, et des vidéos (mov, wmv, avi, etc).

Il ne suffit que d’inclure la libraire javascript de Shadowbox et d’ajouter l’attribut rel=”shadowbox” à une balise <a>, et le tour est joué.

<a href="myimage.jpg" rel="shadowbox">My Image</a>

Parodie de script.aculo.us

écrit par Dominic Martineau le janvier 14, 2008

Dojo a fait une petite parodie de la page d’accueil de Script.aculo.us: dojo.moj.oe!

C’est de bonne guerre :)

dojomojo.png

Prototype 1.6.0 et Scriptaculous 1.8.0 disponible!

écrit par Dominic Martineau le novembre 8, 2007

La nouvelle version de Prototype apporte quelques améliorations majeures et naturellement, quelques corrections d’anomalies et de l’optimisation de performance. Voici les changements principaux:

  • Ajax transport objects are now automatically wrapped in an Ajax.Response object.
  • Ajax.Response includes support for accessing JSON response bodies as JavaScript objects via the responseJSON property.
  • The class API now includes full support for inheritance and superclass method calls. (See Mislav’s tutorial for more info.)
  • Class objects now have an addMethods method for adding instance methods after creation.
  • Elements can be created easily with the new Element(…) syntax.
  • Element#insert provides a unified API to DOM element and HTML fragment insertion.
  • Element#select is an alias for getElementsBySelector and is now the preferred way to find elements by class name.
  • Element#wrap lets you easily wrap an element inside another element in place.
  • Enumerable methods on Array are now backed by native Array#forEach implementations when possible.
  • Enumerable now has aliases for equivalent JavaScript 1.6 Array methods, and support for JavaScript 1.6’s context parameter for automatic callback binding.
  • Enumerable#grep now calls the match method on its first argument, so you can use it to e.g. filter an array of DOM nodes by CSS selector.
  • Event objects are now automatically extended with instance methods, so you can write e.g. event.stop() instead of Event.stop(event).
  • Prototype’s event API now supports firing DOM-based custom events with Element#fire.
  • The new dom:loaded custom event fires when the entire document has loaded and is ready for manipulation.
  • Function#curry allows for partial application of function arguments.
  • Function#wrap facilitates simple aspect-oriented programming and provides the basis for Prototype’s superclass method call mechanism.
  • Function#delay delays invocation of the function by the given number of seconds.
  • Function#defer schedules the function to run as soon as the interpreter is idle.
  • The Hash API has changed, and you must now use Hash#get and Hash#set instead of directly accessing properties on Hash instances.
  • String#interpolate is a shortcut for instantiating a Template from the string and calling evaluate on it.
  • Object properties can now be used in template replacement strings.

Pour les changements complet, voir le CHANGELOG et les notes des releases 1.6.0_rc0 et 1.6.0_rc1.

Quant à lui, Scriptaculous contient les nouveautés suivantes:

  • Complete rewrite of the in-place editing controls.
  • Full CSS inheritance support for Effect.Morph.
  • Support for tweening between two values of an element property or method call with Effect.Tween.
  • A new sound API for playing interface sound effect MP3s.
  • Numerous bug fixes and performance improvements.

Source: http://prototypejs.org/2007/11/7/prototype-1-6-0-script-aculo-us-1-8-0-…