Playground

The Playground features web experiments, concepts, and layouts that push the boundaries of traditional design and showcase the latest in animation techniques.

Some Useful JavaScript & jQuery Snippets – Part 4

by cody

How to get client ip address with jQuery $.getJSON(“http://jsonip.appspot.com?callback=?”,function(data){ alert( “Your ip: ” + data.ip); }); How to parse XML with jQuery file.xml: <?xml version=”1.0″ ?> <result> <item> <id>1</id> <title>title1</title> […]

Some Useful JavaScript & jQuery Snippets – Part 3

by cody

How to hide all children div except a specific one with jQuery? $(‘#target div:not(#exclude)’).hide(); //or $(‘#target’).children().filter(‘:not(#exclude)’).hide(); Detecting when a div’s height changes using jQuery $(‘element’).bind(‘resize’, function(){ alert( ‘Height changed to’ […]

Some Useful JavaScript & jQuery Snippets – Part 2

by cody

Check if cookies are enabled $(document).ready(function() { var dt = new Date(); dt.setSeconds(dt.getSeconds() + 60); document.cookie = “cookietest=1; expires=” + dt.toGMTString(); var cookiesEnabled = document.cookie.indexOf(“cookietest=”) != -1; if(!cookiesEnabled){ //cookies are […]

jBookMark: A jQuery Marking Tool

by cody

Ever missed the bookmarking option of a good editor in a web site? This jQuery plugin does exactly that: if you want your website visitors to be able to toggle […]