Answer the question
In order to leave comments, you need to log in
How to make it so that when clicking on one element, the value of some parameter of the other changes, i.e. added, for example, every time?
It is necessary that when clicking on .arrow-next-timeline
each time, some value is added to the parameter left
y .overflow-timeline>div
Wrote something like this, but something is not right ...
$('.arrow-next-timeline').on('click', function(){
var i = $('.overflow-timeline>div').css('left');
i += 100;
$('.overflow-timeline>div').css('left', i + 'px');
});
Answer the question
In order to leave comments, you need to log in
var left = 0;
$('.first').on('click', function () {
left++;
$('.second')[0].style.left = left + 'px';
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question