jquery anchor click doesn't seem to work....
- by Pandiya Chendur
Here is function ,
<script type="text/javascript">
$(document).ready(function() {
getRecordspage(1, 5);
$("a.page-numbers").click(function() {
alert(1);
getRecordspage($(this).text(), 5);
return false;
});
});
And in my page i am appending anchors dynamically to this div,
<div id="pager" class="pager">
//my anchors will be present here...
</div>
i am appending anchors dynamically... All anchors will have class="page-numbers"... How it can be done...
When inspected through firebug my pager div had this when i clicked 3,
<div class="pager" id="pager">
<a class="page-numbers prev" href="#">Prev</a>
<a class="page-numbers" href="#">1</a>
<a class="page-numbers" href="#">2</a>
<span class="page-numbers current">3</span>
<a class="page-numbers" href="#">4</a>
<a class="page-numbers next" href="#">Next</a></div>