I am using JavaScript with jQuery. I have the following
var $ticket = $nxt.parent().prev().children('.ticket');
and $ticket.text() is integer 1.
I want to increment it by 1 when when I click as;
$('.next').click(function()
How can I do this??
.html()documentation? api.jquery.com/html (although.text()would be better here imo).$ticket.data("currentIndex", 1);$ticket.data("currentIndex", $ticket.data("currentIndex") + 1);