<select name="test" > <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select>
$('select[name=test] option[value={$type}]').attr('selected', 'selected');