jQuery Store Locator doesn't work when upload to another CMS

Hello,

I’m not sure why this “jQuery Store Locator” is not working when I enter a zipcode or address. It was working fine in DW when I tested it. It brings up the nearest location and a Google map. But when I copy and paste the code to another CMS, it wouldn’t work when I click on the submit button. I’m using the locations.kml file that was created through Google Maps. Any help would be appreciated from this noob.


<!DOCTYPE html>
<html>
  <head>
    <title>Library Locations</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="http://abclibrary.org/loader.php?type=d&id=887068" /><!--map.css-->
  </head>

  <body>

    <div id="store-locator-container">
      <div id="page-header">
        <h1>Library Locations</h1>

      </div>

      <div id="form-container">
        <form id="user-location" method="post" action="#">
            <div id="form-input">
              <label for="address">Enter Address or Zip Code:</label>
              <input type="text" id="address" name="address" />
             </div>

            <button id="submit" type="submit">Submit</button>
        </form>
      </div>

      <div id="map-container">
        <div id="loc-list">
            <ul id="list"></ul>
        </div>
        <div id="map"></div>
      </div>
    </div>

    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script src="http://abclibrary.org/loader.php?type=d&id=887073"></script><!--handlebars-1.0.0.min-->
    <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script src="http://abclibrary.org/loader.php?type=d&id=887074"></script><!--jquery.storelocator-->

      <script>
        $(function() {
          $('#map-container').storeLocator({'dataType': 'kml', 'dataLocation': 'locations.kml'});
        });
      </script>

  </body>
</html>

If I run your code from my desktop, I get two errors. Two files are not found:

/templates/kml-infowindow-description.html
/templates/kml-location-list-description.html

Not sure how it all works, but make sure those files are accessible online.

How would I link the to files on my current script? If open it in DW I get this. They’re not JS files. Thank you for your help.

kml-infowindow:

{{#location}}
<div class="loc-name">{{name}}</div>
<div>{{{description}}}</div>
{{/location}}

kml-location-list-description:

{{#location}}
<li data-markerid="{{markerid}}">
	<div class="list-label">{{marker}}</div>
	<div class="list-details">
		<div class="list-content">
			<div class="loc-name">{{name}}</div>
			<div>{{{description}}}</div>
		</div>
	</div>
</li>
{{/location}}

I’d say go back to the docs for that plugin, as the code above is meaningless on its own. A step must have been missed somewhere, as you shouldn’t be stuck with a problem like this.