title: Trying to pass a jQuery mobile range slider value between functions is not working
body: <p>How can I make this min variable global in scope so I can pass it to another function? I tried declaring it outside the function but still doesn't work. It will not recognize the variable inside the form submit function.</p>
  
  <pre><code>var min;
  
  $( ".minBuyingSlider" ).on( 'slidestop', function( event ) {
      var min = $(this).val();
  });
  
  $(".range_form").submit(function(e){
    $.ajax({
      'type': "GET",
      'url': 'loc.php?range=' + min,
      'data': {},
      'success': function (data) {  
        $("#results").replaceWith(data);
      }     
  });
  e.preventDefault();
  });
  </code></pre>