Error in jquery paging

Posted by Klbaiju under jQuery on 5/21/2015 | Points: 10 | Views : 437 | Status : [Member] | Replies : 0
Hi ,

I want to make clientside paging in my application.

following is working fine in my application

var cnt=4;

var $pagenumbers = $('<div id="pages"></div>');
for (i = 0; i < cnt; i++) {
$(' <a href=\"#\" id=' + (i + 1) + ' class="page">' + (i + 1) + '</a>').appendTo($pagenumbers);
}
$pagenumbers.insertAfter('#st');

this will display 1 2 3 4.

my requirement is add anchor with << and >> symbols before and after paging numbers like << 1 2 3 4 >> .

for that i tried following code

var cnt=4;

var $pagenumbers = $('<div id="pages"></div>');
for (i = 0; i < cnt; i++) {
$(' <a href=\"#\"> '<<'</a> <a href=\"#\" id=' + (i + 1) + ' class="page">' + (i + 1) + '</a> <a href=\"#\"> '>>'</a>').appendTo($pagenumbers);
}
$pagenumbers.insertAfter('#st');

But this is not working .how to solve this

Regards

Baiju




Responses

(No response found.)

Login to post response