Title: Table pagination not work
Tags: jquery;jquery-plugins;pagination
Question: I use two jQuery plugins: quickSearch and tablePagination 

When I type text into the input box, pagination doesn't work :(

This is my code:

```<html&gt;<head&gt;
    <script type="text/javascript" src="/js/jquery.js"&gt;</script&gt;
    <script type="text/javascript" src="/js/jquery.quicksearch.pack.js"&gt;</script&gt;
    <script type="text/javascript" src="/js/jquery.tablePagination.js"&gt;</script&gt;
    <script&gt;
        var options = {rowsPerPage : 2,}

        $('#admin_table').tablePagination(options);

        $('table#admin_table tbody tr').quicksearch({
            position: 'before',
            attached: '#admin_table',
            labelText: 'Search'
        });
    </script&gt;
</head&gt;
<body&gt;
    <table id="admin_table" class="admin_table"&gt;
    <tbody&gt;
        <tr&gt;<td&gt;test</td&gt;<td&gt;test11</td&gt;</tr&gt;
        <tr&gt;<td&gt;te</td&gt;<td&gt;tt11</td&gt;</tr&gt;
        <tr&gt;<td&gt;te4t</td&gt;<td&gt;tes211</td&gt;</tr&gt;
        <tr&gt;<td&gt;tes45t</td&gt;<td&gt;te234st11</td&gt;</tr&gt;
        <tr&gt;<td&gt;te67st</td&gt;<td&gt;te123st11</td&gt;</tr&gt;
</body&gt;
</html&gt;
```

How can I do pagination if I type text into the search input?

Comment: btw. you are missing the type attribute from one of your script tags. After `var options = {...}` you should add a semi-colon. and you are missing the closing `` and `` tags

Here is the accepted answer: Try this fixed version. Your main problem probably is that you didn't wrap your initialization code into the ```$(document).ready(function() { ... });``` block. By not doing that you have multiple potential error sources. Code gets executed before quicksearch and or tablepagination are fully load and/or gets executed before the table itself is visible in the dom as it gets rendered after the javascript

```<html&gt;<head&gt;
    <script type="text/javascript" src="/js/jquery.js"&gt;</script&gt;
    <script type="text/javascript" src="/js/jquery.quicksearch.pack.js"&gt;</script&gt;
    <script type="text/javascript" src="/js/jquery.tablePagination.js"&gt;</script&gt;
    <script type="text/javascript"&gt;
        var options = {rowsPerPage : 2,};
        $(document).ready(function() {
            $('table#admin_table').tablePagination(options);

            $('table#admin_table &gt; tbody &gt; tr').quicksearch({
                position: 'before',
                attached: '#admin_table',
                labelText: 'Search'
            });
        });
    </script&gt;
</head&gt;
<body&gt;
    <table id="admin_table" class="admin_table"&gt;
    <tbody&gt;
        <tr&gt;<td&gt;test</td&gt;<td&gt;test11</td&gt;</tr&gt;
        <tr&gt;<td&gt;te</td&gt;<td&gt;tt11</td&gt;</tr&gt;
        <tr&gt;<td&gt;te4t</td&gt;<td&gt;tes211</td&gt;</tr&gt;
        <tr&gt;<td&gt;tes45t</td&gt;<td&gt;te234st11</td&gt;</tr&gt;
        <tr&gt;<td&gt;te67st</td&gt;<td&gt;te123st11</td&gt;</tr&gt;
    </tbody&gt;
    </table&gt;
</body&gt;
</html&gt;
```



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 2.5', 'CreationDate': '2009:00:12/03/09', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<jquery><jquery-plugins><pagination>', 'Title': 'Table pagination not work', 'ViewCount': 1280, 'id': 1838435, 'user_AboutMe': '<p>JS lover, Python fun</p>\n', 'user_AccountId': 62900.0, 'user_DisplayName': 'Vadim Chernysh', 'user_Reputation': 143.0, 'user_Views': 45.0, 'user_id': 186557.0}}