Paging using table sorter code

Paging using table sorter code

  1. <%

    @ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Test2.Models.Movie>>" %>

    <

    asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

    Index

    </

    asp:Content>

    <

    asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <link href="../../Content/style.css" rel="stylesheet" type="text/css" />

    <link href="../../Content/jquery.tablesorter.pager.css" rel="stylesheet" type="text/css" />

    <script src="../../Scripts/jquery-latest.js" type="text/javascript"></script>

    <script src="../../Scripts/jquery.tablesorter.js" type="text/javascript"></script>

    <script type="text/jscript">

    $(document).ready(

    function () { $("#myTable").tablesorter(); });

    </script>

    <script type="text/jscript">

    $(document).ready(

    function () { $("table").tablesorter({ widthFixed: true, widgets: ['zebra'] }).tablesorterPager({ container: $("#pager") }); });

    </script>

    <h2>

    Index

    </h2>

    <p>

    <%

    : Html.ActionLink("Create New", "Create") %>

    </p>

    <table id="myTable" class="tablesorter">

    <thead>

    <tr>

    <th>

    Title

    </th>

    <th>

    ReleaseDate

    </th>

    <th>

    Genre

    </th>

    <th>

    Price

    </th>

    <th>

    </th>

    </tr>

    </thead>

    <tbody>
  2. body content here

    </tbody>

    </table>

    <div id="pager" class="pager">

    <img src="../../Content/themes/base/images/first.png" class="first" alt="" />

    <img src="../../Content/themes/base/images/prev.png" class="prev" alt="" />

    <input type="text" class="pagedisplay" />

    <img src="../../Content/themes/base/images/next.png" class="next" alt="" />

    <img src="../../Content/themes/base/images/last.png" class="last" alt="" />

    <select class="pagesize">

    <option selected="selected" value="10">10</option>

    <option value="20">20</option>

    <option value="30">30</option>

    <option value="40">40</option>

    </select>

    </div>

    </

    asp:Content>

  3. This is the code I have to implement sorting and paging... using http://tablesorter.com/docs/index.html
    Sorting is working fine but paging is not working.. Getting a object does not support this property or method at 


    $(document).ready( function () { $( "table" ).tablesorter({ widthFixed: true , widgets: [ 'zebra' ] }).tablesorterPager({ container: $( "#pager" ) }); });

    Can you please help..

    I am using MVC3 and IE7