I have a few div
s with the .class
class whose scroll position is defined by another child of its parent, so I need to assign a scrollTop()
with $(this)
, something like
$(".class").scrollTop($(this).parent().find('.child').scrollTop());
But that code doesn't work...
$(".class").scrollTop(
function(){
$(this).parent().find('.child').scrollTop()
}
);
Doesn't work either. Any clue?
Aucun commentaire:
Enregistrer un commentaire