storeLocator is not a function when using with require.js
If I include all the required js files inline the plugin works fine. If I include them using require.js the function is returned null. "storeLocator is not a function". Any thoughts on how to solve this?
bump
Bump. I am having this issue as well. Thanks in advance
up
1
`require( ['handlebars', 'jquery', 'locator'], function(Handlebars, $) {
window.Handlebars = Handlebars;
var useLocator = $('#bh-sl-map-container');
/* Map */ if(useLocator){ useLocator.storeLocator({ dataType: 'json', dataLocation: '/stores.php', infowindowTemplatePath: '/infowindow-description.html', listTemplatePath: '/lib/store-locator/assets/js/plugins/storeLocator/templates/location-list-description.html', mileLang: 'mi.', milesLang: 'mi.', openNearest: true, distanceAlert: -1, mapSettings: { zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP }, storeLimit: 10 }); }
}); `
ok i am new to requirejs.
how to define the Plugin in requirejs ?
any advice?