I have a multiple select list defined like this
<select id="MyId" multiple="multiple">
<option value = 1>This is one</option>
etc...
</select>
I am trying to use the scrollTo plugin like this
$("#MyId option").scrollTo("[value=1]", 100)
I have tried a few different combinations with no results.
Does anyone have any idea what I am doing wrong?
Edit: I want to be able to scroll to any given value. Not just 1
.scrollTop, nor.position() returned a pixel value (they returned 0). So instead I used .index() on the value I was searching for in my option elements. I then multiplied it by the height of one element in the select lis. Ithen used scrollTop(), passing in the value found previous