I have created multiple sections which I solved by this Create sections on searchpage.
Now I would like to add unique pagination which is connected to each separate section. A demo of what it looks like now can be found on http://verket2017.staging.wpengine.com/?s= where you can see the sections Products (Produkter) and Posts (Inlegg) .
Below each section there is a pagination attempt that needs twerking.
The code for the JS can be seen here https://gist.github.com/damircalusic/2285ffef35a406211bb98e411a0cc2c7
How can I create a seperate pagination for each section?