jsRender and paging-Collection of common programming errors

I am trying to get jsRender and paging to work, but I am somewhat new to jsRender and jquery for that matter. I have tried to modify this to work with jsRender instead, but I am having only limited success.

  1. I am getting an exception when I click the “next page” link (see the code). The exception is “JsRender Error: Unknown template: “#items” – I think it happens because the code is overwritten on subsequent data fetch, but I am not sure how to fix it – any help is appreciated.
  2. Can anybody suggest some hints to create a numeric paging mechanism as well? E.g. “> – clicking on the “…” will reset the numerics to “