I have this pagination div:
<div class="pagination"><ul><li><a href="javascript:void(0);">Prev</a></li>
<li><a href="javascript:void(0);">1</a></li>
<li><a href="javascript:void(0);" value="2">2</a></li>
<li><a href="javascript:void(0);">3</a></li>
<li><a href="javascript:void(0);">4</a></li><li><a href="javascript:void(0);">5</a></li>
<li><a href="javascript:void(0);">Next</a></li></ul></div>
this is my jQuery code:
$(function () {
$(document).on("click", "a#pagniated_list", function () {
getPagnatedQs(this);
});
});
function getPagnatedQs(element) {
var User = new Object();
User.page = $('.pagination').val();
console.log(User.page);
}
I can not figure out why I can not pickup the value of the li which is number 1 ~ 5. I tried also .pagination ul li
not working neither.
Update
I just want to mention that the value picked up will be using as a numeric calculation in client side js. the one pick up with .html did not work.