Return to Snippet

Revision: 31044
at August 28, 2010 00:54 by davebowker

Initial Code
var searchHiddenSort;
	$('.ukn-search-sort a').click(function(e) {
		if ($(this).hasClass('ukn-search-sort-selected')) { return false; }
		var text = $(this).text();
		$('.ukn-search-sort-date, .ukn-search-sort-relevance').removeClass('ukn-search-sort-selected');
		$(this).addClass('ukn-search-sort-selected').parents('fieldset').find('.ukn-search-box input').focus();
		if(searchHiddenSort) return;
		searchHiddenSort = true;
		$('.ukn-search fieldset').prepend('<input class="ukn-form-hidden-search-sort" type="hidden" name="sort" value=' + text + ' />');

Initial URL

Initial Description
If on do nothing. If on make off. If off make on. Alter external value and focus.

Initial Title
Search sorting buttons

Initial Tags
sort, date, search, jquery

Initial Language