22 May 2012

CSS 3D Accordion effect

Here is a little experience to create an accordion/paper fold effect using only the CSS3 RotateY properties. This example is inspired by the paper fold effect made here: https://developer.mozilla.org/en-US/demos/detail/paperfold-css/launch

This example works under chrome and safari. It should work perfectly under firefox with the right prefixer. 

Example: http://jsfiddle.net/maxparm/Jy5fK/show/

18 May 2012

How to disable jQuery Mobile Router with Backbone.js

When creating a mobile application, Backbone.js and jQuery Mobile are two good solutions to use for your development. Both are providing a routing system but you'll get conflict using them together.

For that, the solution is to disable one, I prefer to take out jQuery Mobile router and keep using Backbone's one. In order to have the transition between the page, I am triggering manually the function $.changePage provided by jQuery Mobile, usually this one is used automatically by the JQM router.

To disable jQuery Mobile router add in your code before any jQuery mobile code:

$.mobile.ajaxEnabled = false;
$.mobile.linkBindingEnabled = false;
$.mobile.hashListeningEnabled = false;
$.mobile.pushStateEnabled = false;
$.mobile.changePage.defaults.changeHash = false;

Or have a look on the full example:

17 Apr 2012

Display a user Pinterest feed with jQuery

Here is a little jquery script to display the pinterest feed of a user: http://jsfiddle.net/maxparm/JLKYx/ 

The layout is build using the excellent jquery masonry plugin: http://masonry.desandro.com/, and the rss feed is read using the google javascript feed api.

9 Apr 2012

Javascript: Is 21 years old?

9 Apr 2012

Javascript Validate Date mm/dd/yyyy

9 Apr 2012

Javascript Validate Url

9 Apr 2012

Javascript RFC2822 Email Validation

Regex to valid email according to RFC 2822 specification http://www.ietf.org/rfc/rfc2822.txt

4 Apr 2012

Report PHP Bugs

Copy paste this code at the beginning of your bootstrapping file.

30 Mar 2012

Command to upload file to remote server

Quick snippet to upload the file example.txt to specified path on a remote server.

26 Mar 2012

jQuery: Allow only numeric characters in HTML input

Maxime Parmentier's Space

Hey, I'm Max! I'm a french of 27 years old, living in Vancouver, Canada. I'm working as a web developer at Invoke Media. I enjoy working with Javascript, CSS, Twitter Bootstrap, Lithium Framework. I also love cooking, biking, playing tennis and ski in BC.