I am trying to implement a feature where the value of an element decreases each time a different element is clicked. Currently, I have the following code:
$("#trigger_heritage").click(function () {
$(".heritage_content ul").css("margin-left", + -880);
// This will move the .heritage_content ul-element 880px further left every time it's clicked
});
However, the element only moves 880px once and does not increase with each click. How can I achieve this functionality?