aboutsummaryrefslogtreecommitdiff
path: root/js/lib/ui.river.js
blob: c103fabb3e6e7ebfea38463af0f471eb521d9ba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
elgg.provide('elgg.ui.river');

elgg.ui.river.init = function() {
	$('#elgg-river-selector').change(function() {
		var url = window.location.href;
		if (window.location.search.length) {
			url = url.substring(0, url.indexOf('?'));
		}
		url += '?' + $(this).val();
		elgg.forward(url);
	});
};

elgg.register_hook_handler('init', 'system', elgg.ui.river.init);