I have this screenshot
https://prnt.sc/265hkiq
and wanted to fetch the active class so i can call another JS function called as filter_JS
basically the filter_JS function runs when i click anywhere in pagination, but i am trying to find a way that when a page is reloaded, how can i make sure that it does not reset to 1 back again. because on pageload the function filter_JS does not run, it only runs when i click on the pagination
i am trying to do something like this
<script type="text/javascript">
if('#pagination').find('span').hasclass('active')
</script>
but i think it will fail because on page reload there will no span active and it has already moved to 1, how can i fix it using anything which is not server specific , maybe using using some local storage or how?
any clues, any sample which can guide me with this will be helpful
Thanks