javascript
Can you tell me why scrolling page with the scrollbar causes text selection?
A nice solution found by chatGPT
React links
Collection of links and notes while approaching React.js, next.js and related topics.
Add Internet Explorer class to body to detect old browser
When you have clients that still uses an old browser, you need to handle it. This javascript function detects the…
Modify list counter in :before pseudo class with jQuery using start attribute
Suppose you have two ordered list ol tags, and the second one has a start attribute. You also have in…
Refresh a Google Adsense banner with Javascript
Often bloggers and site owners use galleries to have a greater number of pages, adding pages means adding clicks. Each…
Detect if is mobile with Javascript, read user agent
How to detect if your user is using a mobile device in Javascript? You can do it by checking the…
Unobtrusive javascript to add an overlay banner
If you have to add an overlay to a site, here is a fast way to do it with an…
New Facebook Invite all friends hack
So, you want to invote all your friends but the old hack doesn’t work anymore? With the last facebook friends…
Get URL parameter in javascript
Sometimes in javascript you have the variable that you need to use in the url, as a parameter passed in…
Get file name in javascript
How to get the file name of the page? When you need to read the file name of the current…
How to write a text description into html input type password
Sometime designers put form labels and instrucions into html inputs. One of the common uses is for login boxes when…
How to capture enter key pressed in a form (JavaScript)
Suppose you have a login form and you want to send the form when user press enter on his keyboard…
Decimal Degrees conversion and distance of two points on google map
Those two functions are usefull when you’re making Google Maps applications: When you show the coordinates of a point, it’s…
Javascript Ruler for Google Maps v3 to measure distance on map
Javascript example for measuring distances on a Google Maps with a ruler.
Mini gallery/slideshow with PHP and JQuery
Sometimes I’ve had to quickly put in a page a simple slideshow, the first times I’ve searched a lot around…
Clustering many markers with Google Maps v3
I’ve found this blog where Matthias Burtscher converted the Marker Cluster (like the Phoogle2) for Google Maps API v.3. Since…
Click links with JavaScript
If you want to click on objects, anchors, table cells or any other html element to emulate the javascript behaviour…
Set “write here” on input type text?
If you are using JQuery framework and you want to set up the default value of some text box in…
How do I print the elements of an object in Javascript?
This function is similar to the print_r php function: it runs over the elements of an object recursively and put…
Full Screen GControl for Google Maps
Use with phoogle modified class: (see an example here) To use it in the phoogle modified class just turn it…
How do I get the value from a combo in Javascript?
If you don’t use any javascript framework such as jquery.js or prototype.js the combo object isn’t so easy to use,…
OnKeyUp Fix Alphanumerical Chars
When you have an html form and you want only alphanumerical [a-z0-9] chars in your input, you can use this…
Javascript to make some links blink
Mark each anchor tag (<a href…) with rel=”blinking” to make the tag blink (not very clever, but sometimes useful). This…