CodePen

HTML

            
              
            
          
!

CSS

            
              
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              /* create page skeleton html node */
var $page = $($('#primaryPageSkeletonTmpl').html())
    .attr('id', pagenum)
    .attr('data-url', '#' + pagenum);

/* link to previous page (if any) */
if (pagenum == 1) {
    $page.find('.prev').addClass('ui-disabled');
} else {
    $page.find('.prev').attr('href', '#' + (pagenum - 1));
}

/* link to next page (if any) */
if (pagenum == N) {
    $page.find('.next').addClass('ui-disabled');
} else {
    $page.find('.next').attr('href', '#' + (pagenum + 1))
}
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................