question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pagination example not working with newer jQuery

See original GitHub issue

Pagination example seems to be not working with Jquery 2.x or even the newest 1.x (1.12) version. Error in Google Chrome Console: Uncaught Error: Syntax error, unrecognized expression: a[href=#second]

Tested on the newest Chrome browser.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jairoburbanocommented, Jun 15, 2017

The actual problem in the line 10 $(".pagination").find("a[href=#" + ref + "]").addClass("active"); is that after the parameter href are missing the single (or double if is the case) quotes, so the script is looking for some attribute that doesn’t exist href=#somevalue , if you add the quotes like this $(".pagination a[href='#" + ref + "']").addClass("active"); works fine. href='#somevalue'

1reaction
lukehaascommented, Aug 8, 2016

Thanks, I’ll update the example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pagination not working?? - jQuery or Javascript - Stack Overflow
Show activity on this post. I just create dynamic table with Pagination but the pagination is not working with that table.. Im using...
Read more >
Pagination Function is not working with Jquery - Treehouse
This is the function that is causing the page buttons to not show up in the browser. 1 Answer ...
Read more >
simplePagination.js - A simple jQuery pagination plugin and 3 ...
Issues. simplePagination.js. A simple jQuery pagination plugin, 3 CSS themes and Bootstrap support. CSS Themes. "light-theme".
Read more >
Pagination with Jquery not working - Salesforce Stack Exchange
Most likely you are not able to access the apex:pageblocktable. That's because, Id's in Salesforce are auto-generated for visualforce ...
Read more >
Pagination not working when use jquery simplepagination.js ...
~/lib/jquery/dist/jquery.min.js"></script> <link href= ; ~/lib/simplePagination.js/simplePagination.css" rel= ; stylesheet" /> <script src= ; ~/lib ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found