I want a directive or any method to scroll inside div horizontally using angular or javascript, no jquery please.
the fiddle above shows what i'm trying to achieve.
$('#left').click(function () {
var leftPos = $('div.outer_container').scrollLeft();
console.log(leftPos);
$("div.outer_container").animate({
scrollLeft: leftPos - 500
}, 800);
});
$('#right').click(function () {
var leftPos = $('div.outer_container').scrollLeft();
console.log(leftPos);
$("div.outer_container").animate({
scrollLeft: leftPos + 500
}, 800);
});
the above code is jQuery of want i want in angular
Thanks