Skip to content

Instantly share code, notes, and snippets.

@jwoertink
Created May 31, 2012 20:22
Show Gist options
  • Save jwoertink/2845960 to your computer and use it in GitHub Desktop.
Save jwoertink/2845960 to your computer and use it in GitHub Desktop.
<input type="hidden" value="100000" name="minlp" id="minlp" />
<input type="hidden" value="135000" name="maxlp" id="maxlp" />
<select id="pricesel" name="pricesel">
<option value="0,99999">Under $100,000</option>
<option value="100000,135000" selected="selected">$100k ~ $135k</option>
<option value="136000,190000">$136k ~ $190k</option>
...
</select>
$(function() {
if($('#pricesel').length > 0) {
$('#pricesel').change(function() {
var vals = $(this).val().split(',');
$('#minlp').val(vals[0]);
$('#maxlp').val(vals[1]);
return false;
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment