Revision: 11192
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 27, 2009 17:20 by garside
Initial Code
$.urlParam = function(name){ var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); return results[1] || 0; } // example.com?someparam=name&otherparam=8&id=6 $.urlParam('someparam'); // name $.urlParam('id'); // 6 $.urlParam('notavar'); // null
Initial URL
Initial Description
Initial Title
Retrieve URL params with jQuery
Initial Tags
url, jquery
Initial Language
jQuery