Created
April 1, 2016 11:07
-
-
Save laurenclark/da0435524a39fb9485e592ec5a3a8d6c to your computer and use it in GitHub Desktop.
Current page from url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $url = $(location).attr('href'); | |
var str = $url; | |
var tmp = str.split("/"); | |
var page = +tmp.pop() + 1; | |
$('#pageNo').html("Current Page: <strong>" + page + "<strong>"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment