<a data-pagenum="2" onclick="paginate(this)" href="#">2</a>
  var pageNum = $(pThis).data("pagenum");

  //Outputs 2 in Console
  console.log(pageNum);

Comments are closed.