title: Uncaught TypeError: $(...).dialog is not a function
body: <p>Whenever I am calling markicons() function for opening the google map it  is  showing  Uncaught TypeError: .dialog is not a function.I am not getting where is the error.Please help me.I am trying from last 3 hours but not getting any solution.</p>
  
  <pre><code> &lt;link href="../PurpleStyle/css/style.css" rel="stylesheet" /&gt;
   &lt;script src="../assets/js/jquery-2.0.3.min.js"&gt;&lt;/script&gt;
    &lt;script src="../assets/js/jquery-ui-1.10.3.full.min.js"&gt;&lt;/script&gt;
  &lt;link href="../assets/css/jquery-ui-1.10.3.full.min.css" rel="stylesheet"     /&gt;
    &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?libraries=geometry&amp;sensor=false"&gt;&lt;/script&gt;
    &lt;script src="../PurpleStyle/js/jquery.js" type="text/javascript"&gt;&lt;/script&gt;
   &lt;script type="text/javascript"&gt;    
   var map = null; var infowindow;
      function InitializeMap() {
          debugger;
          var latlng = new google.maps.LatLng(0.0, 0.0);
          if (!map) {
              var myOptions = {
                  zoom: 14,
                  center: latlng,
                  mapTypeId: google.maps.MapTypeId.ROADMAP
              };
              map = new google.maps.Map(document.getElementById('map'), myOptions);
          }
          else {
              map.setCenter(latlng);
          }
      }
      function markicons(listString) {
  
          debugger;
          InitializeMap();
          var locations = [];
          var ltlng = listString.split('~');
  
  
          for (var i = 0; i &lt; ltlng.length; i++) {
              var loc = ltlng[i].split(",")
              var lat = parseFloat(loc[0])
              var lng = parseFloat(loc[1])
              locations.push(new google.maps.LatLng(lat, lng));
          }
          debugger;
          map.setCenter(locations[0]);
          for (var i = 0; i &lt; locations.length; i++) {
              marker = new google.maps.Marker({
                  map: map,
                  position: locations[i]
              });
  
              (function (i, marker) {
  
                  google.maps.event.addListener(marker, 'click', function () {
  
                      if (!infowindow) {
                          infowindow = new google.maps.InfoWindow();
                      }
  
                      infowindow.setContent("Message" + i);
  
                      infowindow.open(map, marker);
  
                  });
  
              })(i, marker);
  
          }
          var dil = $("#map").dialog({
              autoOpen: false,
              minHeight: 500,
              minWidth: 600,
              height: 500,
              width: 600,
              closeOnEscape: true,
              modal: true,
              buttons: {
                  "CLOSE": function () {
                      $(this).dialog("close");
                      //$("#map").style.display = "none";
                  }
              }
          });
          dil.dialog('open');
      }
     &lt;/script&gt;
  </code></pre>