Here I created a sample to help me understand http://www.jsfiddle.net/BLvsF/
I want the -6 element to scroll to the visible selection field, how can I do this? I would like to use jquery to do the same thing as
$(document).ready(function() { $('#btn').click(function() { document.getElementById('a6').scrollIntoView(); }); });
but how to implement the same with jQuery?
I tried using .get (0) .scrollIntoView (). but still not applicable.
$(document).ready(function() { $('#btn').click(function() { $('#a> option:selected').clone(false).appendTo('#b').get(0).scrollIntoView(); }); });
http://www.jsfiddle.net/CYQfD/
Thanks Elaine
source share