All posts about Javascript

Complete Javascript popup opener

Opening popups in JS is simple, but sometimes in the same page we need to open popups with different features. There are several scripts in the net doing this task but, as usual, none of them seemed to fit my needs I decided to code a complete javascript popup opener in order to have one […]

Javascript Sokoban game script

I’ve always been addicted to logic games and Sokoban is one of them. From Wikipedia: Sokoban (warehouse keeper) is a transport puzzle in which the player pushes boxes around a maze, viewed from above, and tries to put them in designated locations. Only one box may be pushed at a time, not two, and boxes […]

Click image and get coordinates with Javascript

I had to display several photos where the user can click over an interesting point and have its coordinates passed through a form. Of course, it was a bit more complicated, but this is the code i want to share with you. Let’s assume we have a photo like this: Try to click on a […]

Mouse wheel handler in Javascript

I found this very very interesting script by Adomas Paltanavičius to determine if you are using mousewheel. It returns a delta value, +1 or -1, according to scroll direction. Scroll mouse wheel to see delta here. I am publishing it here, and very soon I will start to use it to code games, form handlers, […]

Enhanced country selection with Css and Javascript

How many times you had to choose your country in a form, with a old, simple popup? Time to change the way you choose your country (or anything else) with a bit of Css and Javascript. I am showing the example in a iframe not to mess with WordPress styles. As you can see, when […]

Javascript chronometer/stopwatch

I needed a javascript chronometer/stopwatch to be inserted in a project, and I didn’t find anything on the web that fit my idea, so I created one almost from scratch, with all functions a chronometer should have, such as milliseconds measurement, start, stop, lap time and so on (well… that’s all). Time: Lap: Let’s see […]