dist/assets/js/plugins/storeLocator/jquery.storelocator.js
function(nearestLoc, infowindow, storeStart, page) {
			this.writeDebug('openNearestLocation',arguments);

			if (this.settings.openNearest !== true || typeof nearestLoc === 'undefined' || (this.settings.fullMapStart === true && firstRun === true) || (this.settings.defaultLoc === true && firstRun === true)) {
				return;
			}

			var _this = this;

			// Callback
			if (_this.settings.callbackNearestLoc) {
				_this.settings.callbackNearestLoc.call(this, _this.map, nearestLoc, infowindow, storeStart, page);
			}

			var markerId = 0;
			var selectedMarker = markers[markerId];

			_this.createInfowindow(selectedMarker, 'left', infowindow, storeStart, page);

			// Scroll list to selected marker
			var $container = $('.' + _this.settings.locationList);
			var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']');

			// Focus on the list
			$('.' + _this.settings.locationList + ' li').removeClass('list-focus');
			$selectedLocation.addClass('list-focus');

			$container.animate({
				scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop()
			});
		}
function(nearestLoc, infowindow, storeStart, page) {
			this.writeDebug('openNearestLocation',arguments);

			if (this.settings.openNearest !== true || typeof nearestLoc === 'undefined' || (this.settings.fullMapStart === true && firstRun === true) || (this.settings.defaultLoc === true && firstRun === true)) {
				return;
			}

			var _this = this;

			// Callback
			if (_this.settings.callbackNearestLoc) {
				_this.settings.callbackNearestLoc.call(this, _this.map, nearestLoc, infowindow, storeStart, page);
			}

			var markerId = 0;
			var selectedMarker = markers[markerId];

			_this.createInfowindow(selectedMarker, 'left', infowindow, storeStart, page);

			// Scroll list to selected marker
			var $container = $('.' + _this.settings.locationList);
			var $selectedLocation = $('.' + _this.settings.locationList + ' li[data-markerid=' + markerId + ']');

			// Focus on the list
			$('.' + _this.settings.locationList + ' li').removeClass('list-focus');
			$selectedLocation.addClass('list-focus');

			$container.animate({
				scrollTop: $selectedLocation.offset().top - $container.offset().top + $container.scrollTop()
			});
		}
function ( nearestLoc , infowindow , storeStart , page ) { this . writeDebug ( 'openNearestLocation' , arguments ) ; if ( this . settings . openNearest !== true || typeof nearestLoc === 'undefined' || ( this . settings . fullMapStart === true && firstRun === true ) || ( this . settings . defaultLoc === true && firstRun === true ) ) { return ; } var _this = this ; // Callback if ( _this . settings . callbackNearestLoc ) { _this . settings . callbackNearestLoc . call ( this , _this . map , nearestLoc , infowindow , storeStart , page ) ; } var markerId = 0 ; var selectedMarker = markers [ markerId ] ; _this . createInfowindow ( selectedMarker , 'left' , infowindow , storeStart , page ) ; // Scroll list to selected marker var $container = $ ( '.' + _this . settings . locationList ) ; var $selectedLocation = $ ( '.' + _this . settings . locationList + ' li[data-markerid=' + markerId + ']' ) ; // Focus on the list $ ( '.' + _this . settings . locationList + ' li' ) . removeClass ( 'list-focus' ) ; $selectedLocation . addClass ( 'list-focus' ) ; $container . animate ( { scrollTop : $selectedLocation . offset ( ) . top - $container . offset ( ) . top + $container . scrollTop ( ) } ) ; }
Open and select the location closest to the origin

@param nearestLoc {Object} Details for the nearest location
@param infowindow {Object} Info window object
@param storeStart {number} Starting point of current page when pagination is enabled
@param page {number} Current page number when pagination is enabled
Open and select the location closest to the origin