Quantcast
Channel: A little something about everything - JavaScript
Browsing latest articles
Browse All 4 View Live

How to redirect and handle mobile clients with JavaScript using cookies

Create a file called mobile.js and add the following code to it, be sure to replace shawnhyde.com with your own domain name.function Set( name, value, expires, path, domain, secure ) { var today = new...

View Article



Change Style for Multiple Elements onClick: getElementById,...

With a bit of creative javascript and these Methods you can do some pretty neat stuff. On this page I've create an example for multiple elements display block/none function based onclick function. You...

View Article

simple Show/Hide content or multiple Div's using only javascript and CSS

#bio2,#bio3 { display: none; }Simple script to show and hide multiple div'sExample:Spotlight 1,Spotlight 2, Spotlight 3Spotlight 1 contentSpotlight 2 contentSpotlight 3 contentThe code:<script...

View Article

lightweight Javascript toggle function without jquery to display block/none...

Here is a quick lightweight javascript toggle function for sites where you dont want to use jquery.The JavaScript:<script> function toggle(id) { var e = document.getElementById(id);...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images