function go_to(path, params)
{
	var url											= window.location.href.split(/[?#]/)[0],
		query_string								= {};
	$.each(params, function(key, val)
	{
		if(val)
		{
			query_string[key]						= val;
		}
	});
	
	if(Object.keys(query_string).length <= 1)
	{
		query_string								= null;
	}
	
	return url.replace(/\/$/, '') + (path ? '/' + path : '') + (query_string ? '?' + $.param(query_string) : '');
}
/**
 * go_to
 * overtake the helper function from php to used in javascript
 *
 * @param	string	url
 * @param	object	params
 * @return	string
 */
go_to
overtake the helper function from php to used in javascript

@param       string  url
@param       object  params
@return      string
go_to overtake the helper function from php to used in javascript @param string url @param object params @return string
function go_to(path, params)
{
	var url											= window.location.href.split(/[?#]/)[0],
		query_string								= {};
	$.each(params, function(key, val)
	{
		if(val)
		{
			query_string[key]						= val;
		}
	});
	if(Object.keys(query_string).length <= 1)
	{
		query_string								= null;
	}
	return url.replace(/\/$/, '') + (path ? '/' + path : '') + (query_string ? '?' + $.param(query_string) : '');
}
function go_to ( path , params ) { var url = window . location . href . split ( / [?#] / ) [ 0 ] , query_string = { } ; $ . each ( params , function ( key , val ) { if ( val ) { query_string [ key ] = val ; } } ) ; if ( Object . keys ( query_string ) . length <= 1 ) { query_string = null ; } return url . replace ( / \/$ / , '' ) + ( path ? '/' + path : '' ) + ( query_string ? '?' + $ . param ( query_string ) : '' ) ; }
go_to
 overtake the helper function from php to used in javascript
go_to overtake the helper function from php to used in javascript