JumboLove
8/28/2013 - 6:22 PM

Append param to URL

Append param to URL

// appends the parameter with the given name and
// value to the given url and returns the changed url
appendParamToURL: function(url, name, value) {
	var c = "?";
	if (url.indexOf(c) != -1) {
		c = "&";
	}
	return url + c + name + "=" + encodeURIComponent(value);
}