Skip to main content

Auto position

A plugin for auto manage position of dropdown

This select is expected to open on bottom

Html
<select id="autoPositionBottom">
<option value=''></option>
<option value='1'>Awesome</option>
<option value='2'>Beast</option>
<option value='3'>Compatible</option>
<option value='4'>Thomas Edison</option>
<option value='5'>Nikola</option>
<option value='6'>Selectize</option>
<option value='7'>Javascript</option>
</select>

Javascript
$("#autoPositionBottom").selectize({
plugins: ["auto_position"],
});

This select is expected to open on top

You may need to scroll or adjust your browser window

Html
<select id="autoPositionTop">
<option value=''></option>
<option value='1'>Awesome</option>
<option value='2'>Beast</option>
<option value='3'>Compatible</option>
<option value='4'>Thomas Edison</option>
<option value='5'>Nikola</option>
<option value='6'>Selectize</option>
<option value='7'>Javascript</option>
</select>

Javascript
$("#autoPositionTop").selectize({
plugins: ["auto_position"],
});