When the user clicks on a particular button, the scroll position of an element changes. I would like this action to be stored in LocalStorage, but I do not know how to do it ... can you help me?
Here's my script:
$('.btn.parteum').click(function(){
$('#textarea').animate({ scrollLeft: 0 }, 400);
return false;
});
$('.btn.parte2').click(function(){
$('#textarea').animate({ scrollLeft: 140 }, 400);
return false;
});
example: link