Q:

how to scroll div vertical scroll bar on the basis of select box select item?

As requirement i need Horizontal and vertical scroll bars in select box.after research i found that select doesn't support horizontal scroll bar.so that i Wrap the SELECT inside a DIV.
<style type="text/css">
 .scrollable{
   overflow: auto;
   width: 70px; /* adjust this width depending to amount of text to display */
   height: 80px; /* adjust height depending on number of options to display */
   border: 1px silver solid;
 }
 .scrollable select{
   border: none;
 }
</style>

<div class="scrollable" id="scrolldiv">
<select size="6" multiple="multiple" id="selectbox">
    <option value="1" selected>option 1 The Long Option</option>
    <option value="2">option 2</option>
    <option value="3">option 3</option>
    <option value="4">option 4</option>
    <option value="5">option 5 Another Longer than the Long Option ;)</option>
    <option value="6">option 6</option>
</select>
</div>

when the select box item grow,and you want to select item from bottom of select,div vertical scroll bar don't move the select item.
please help me,how can move the vertical scroll bar of div with item selected in select-box.
Thanks

A:

This code work for me.
jQuery(document).ready(function($)
    {

    $('#selectbox').change(function()
    {
     var divscrollvalue = ( parseInt(this.selectedIndex))*17;
     $('#scrolldiv').scrollTop(divscrollvalue );

    });

    });

