code: function() {
  			this.writeDebug('sorting',arguments);
  			var _this = this,
  				$mapDiv = $('#' + _this.settings.mapID),
  				$sortSelect = $('#' + _this.settings.sortID);
  
  			if ($sortSelect.length === 0) {
  				return;
  			}
  
  			$sortSelect.on('change.'+pluginName, function (e) {
  				e.stopPropagation();
  
  				// Reset pagination.
  				if (_this.settings.pagination === true) {
  					_this.paginationChange(0);
  				}
  
  				var sortMethod,
  					sortVal;
  
  				sortMethod = (typeof $(this).find(':selected').attr('data-method') !== 'undefined') ?  $(this).find(':selected').attr('data-method') : 'distance';
  				sortVal = $(this).val();
  
  				_this.settings.sortBy.method = sortMethod;
  				_this.settings.sortBy.prop = sortVal;
  
  				// Callback
  				if (_this.settings.callbackSorting) {
  					_this.settings.callbackSorting.call(this, _this.settings.sortBy);
  				}
  
  				if ($mapDiv.hasClass('bh-sl-map-open')) {
  					_this.mapping(mappingObj);
  				}
  			});
  		}
docs: Set up front-end sorting functionality