Skip to content

Commit c57641d

Browse files
committed
Serlialize was targeting any form on the page instead of the specific formID
1 parent 6840ec3 commit c57641d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

js/jquery.storelocator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* storeLocator v1.1.2 - jQuery store locator plugin
2+
* storeLocator v1.1.3 - jQuery store locator plugin
33
* (c) Copyright 2012, Bjorn Holine (http://www.bjornblog.com)
44
* Released under the MIT license
55
* Distance calculation function by Chris Pietschmann: http://pietschsoft.com/post/2008/02/01/Calculate-Distance-Between-Geocodes-in-C-and-JavaScript.aspx
@@ -83,7 +83,7 @@ $.fn.storeLocator = function(options) {
8383
//Stop the form submission
8484
e.preventDefault();
8585
//Get the user input and use it
86-
var userinput = $('form').serialize();
86+
var userinput = $('#' + settings.formID).serialize();
8787
userinput = userinput.replace("address=","");
8888
if (userinput == "")
8989
{

js/jquery.storelocator.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ A note on the distance calculation: this plugin currently uses a distance functi
88

99
## Changelog
1010

11+
### Version 1.1.3
12+
13+
Serlialize was targeting any form on the page instead of the specific formID. Thanks to Scott for pointing it out.
14+
1115
### Version 1.1.2
1216

1317
Changed it so that the processing stops if the user input is blank.

0 commit comments

Comments
 (0)