var pos = $(this).next();
this transmits itself to the DOM element on which the click occurred.
In General, I advise you to learn more about the context and this, otherwise, further development in JS is a hell of a misunderstanding.
Directly to youtube or dial this context - there are some steep rollers in Russian on these topics, but will have them a few times to watch to understand what is what)
And JQuery is put on the shelf, it gets old and some already think it is the bad form.