may be beda is not not having skills like other support people to help
Here is an example of the JS called in the onclick attribute:
hidden link
Everything in myFunction(), if added in a JS code, will not accept any ShortCodes.
Now, if you would do as in the example linked (or do already) include the JS in the script tags, then it theoretically works with ShortCodes, but that is more by accident than intended.
However, you could:
<p id="demo" onclick="myFunction()">Click me.</p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "[shortcode]";
}
</script>
That, expands the ShortCode.
But using it in a JS function as argument like this:
myFunction(this, '[shortcode]')
That fails.
That is however, not related to the issue that it still would not "increment", given there is just one post if a loop doesn't loop over more items.
Remember that adding ShortCodes to Javascript in general is not something that WordPress "wants" you to do.
It generally is very restricted on ShortCodes and with Toolset you can do a but more, but not use ShortCodes in JS.
Here some info from WP as well:
https://make.wordpress.org/core/2015/07/23/changes-to-the-shortcode-api/
You would not even mind to read my reply.
I consider this issue closed.