Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

97
Views
fetching the class which is active in jquery and calling another javascript function

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!