title: Jquery get selected option's value and custom attribute value
body: <pre><code>var x = document.getElementById("selectCity"); 
  var options = ["Bangalore", "Pune", "Kolkata"]; 
  
  for(var i = 0; i &lt; options.length; i++) {
      var opt = options[i];
      var element = document.createElement("option");
      element.textContent = opt;
      element.value = opt;
      x.appendChild(element);
  }
  
  $('select[name="cityDropdown"]').change(function(){
    cityName=$(this).val();
   });
  </code></pre>
  
  <p>Now with each city i want to store my circle name. and save it as an attribute and pass when the city is selected</p>