Skip to content

Commit f5d9235

Browse files
committed
Expose setup to allow thirdparty usage
1 parent 2d09c5e commit f5d9235

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

client/javascript/addressfinder.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
;
22
(function($) {
33
$(document).ready(function() {
4-
$('.address_finder').each(function(i, elem) {
4+
/**
5+
*
6+
* @param {DOMElement} elem
7+
*/
8+
var setupAddressFinderField = function(elem) {
59
var widget,
610
key = $(elem).data('api-key'),
711
address = $(elem).find('.address_finder_address'),
@@ -64,6 +68,12 @@
6468
input.on('focus', function(e) {
6569
manual.slideUp()
6670
})
71+
}
72+
73+
$('.address_finder').each(function(i, elem) {
74+
setupAddressFinderField(elem);
6775
})
76+
77+
window.setupAddressFinderField = setupAddressFinderField
6878
})
6979
})(jQuery)

0 commit comments

Comments
 (0)