UI


Reverse a regex in javascript ? function reverse(s) { return s.split('').reverse().join(''); } function reverseSequence (s) { // chopper les expression conditionnelles // et construire un tableau pour les stocker var conditionals1 = s.match(/\[(.*?)\]/g); var conditionals2 = s.match(/(\[(.+)\])+\{(.*?)\}/g); var conditionals3 = s.match(/[A-Z\.]{1}\{(.*?)\}/g); var conditionals4 = s.match(/\^(.)/g); // on reverse la sequence […]

Attempt to reverse a regular expression


A little javascript class to handle geolocation in a web browser https://github.com/FabFab/GPS-in-your-browser How it works : GPS.get(); [...] var latitude = GPS.position.latitude; var longitude = GPS.position.longitude; or with a callback: GPS.get(updatePosition); function updatePosition() { var latitude = GPS.position.latitude; var longitude = GPS.position.longitude; [...] } More about Geolocation in web browsers: […]

GPS Geolocation in web browser class in Javascript





1
These past years JavaScript has been the language on the web. Through Ajax, we can do amazing dynamics things on a web page. From what I remember, when I started my first web page a while ago in 2002, Javascript was considered evil. Hard to program, poor documentation, and to […]

Why we love JavaScript


How to get an object real coordinates when there is a zoom or an scroll bar on the page ? var scrOfX = 0, scrOfY = 0; if (typeof(window.pageYOffset) == 'number' ) { //Netscape compliant scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) { […]

Coordinates when there is an offset in the page



1
I participated a while ago in Smashing Magazine CSS3 Contest. The aim was to play with CSS3. So I used my non-talent to design a menu enabling actions on a content, without Javascript. I used the general sibling selector ~, pseudo class :active,  and some other well know stuff, such […]

CSS3 Smashing Magazine Contest


Yes, it exists. Its name is Firebug lite : http://www.makeuseof.com/tag/install-firebug-for-browsers-other-than-firefox/ ô Joie. It’s implemented in Javascript so it works with every browser, and it’s easily book-markable. If you need other Internet Explorer tools for web development : * myDebugBar and Companion.js are a buggy version of Firebug  http://www.my-debugbar.com/wiki/CompanionJS/HomePage * IEtester […]

Firebug for IE and others