bonjour,

j'utilise le plugin jquery jquery.easyPaginate.js qui permet de paginer mes données reçus depuis une base de donnée SQLServer mais j'ai un petit souci qui me bloque.je ne voudrais pas que l'entête soit paginé comme les autres lignes de ma table html.

Code javascript : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// JavaScript Document
/*
* jQuery easyShare plugin
* Update on 28 december 2011
* Version 1.0
*
* Licensed under GPL <http://en.wikipedia.org/wiki/GNU_General_Public_License>
* Copyright (c) 2008, Stéphane Litou <contact@mushtitude.com>
* All rights reserved.
*
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
 
(function($){
$.fn.easyPaginate = function (options) {
    var defaults = {
        paginateElement: 'tbody tr',
        hashPage: 'page',
        elementsPerPage: 3,
        effect: 'default',
        slideOffset: 200,
        firstButton: true,
        firstButtonText: '<<',
        lastButton: true,
        lastButtonText: '>>',        
        prevButton: true,
        prevButtonText: '<',        
        nextButton: true,
        nextButtonText: '>',        
        onSomeEvent: function() {}
    }
 
    return this.each (function (instance) {        
 
        var plugin = Object;
        plugin.el = $(this);
        plugin.el.addClass('easyPaginateList');
 
        plugin.settings = {
            pages: 0,
            objElements: Object,
            currentPage: 1
        }
 
        var getNbOfPages = function() {
            return Math.ceil(plugin.settings.objElements.length / plugin.settings.elementsPerPage);         
        };
 
        var displayNav = function() {
            htmlNav = '<div class="easyPaginateNav" style="text-align:left">';
 
            if(plugin.settings.firstButton) {
                htmlNav += '<a href="#'+plugin.settings.hashPage+':1" title="Premiere page" rel="1" class="first">'+plugin.settings.firstButtonText+'</a>';
            }
 
            if(plugin.settings.prevButton) {
                htmlNav += '<a href="" title="Precedent" rel="" class="prev">'+plugin.settings.prevButtonText+'</a>';
            }
 
            for(i = 1;i <= plugin.settings.pages;i++) {
                htmlNav += '<a href="#'+plugin.settings.hashPage+':'+i+'" title="Page '+i+'" rel="'+i+'" class="page">'+i+'</a>';
            };
 
            if(plugin.settings.nextButton) {
                htmlNav += '<a href="" title="Suivant" rel="" class="next">'+plugin.settings.nextButtonText+'</a>';
            }
 
            if(plugin.settings.lastButton) {
                htmlNav += '<a href="#'+plugin.settings.hashPage+':'+plugin.settings.pages+'" title="Dernière page" rel="'+plugin.settings.pages+'" class="last">'+plugin.settings.lastButtonText+'</a>';
            }
 
            htmlNav += '</div>';
            plugin.nav = $(htmlNav);
            plugin.nav.css({
				'align': 'center',
                'width': plugin.el.width()/4, //<== largeur de la dive de pagination
                'margin-left': 'auto'
            });
            plugin.el.after(plugin.nav);
 
            $('.easyPaginateNav a.page, .easyPaginateNav a.first, .easyPaginateNav a.last', plugin).live('click', function(e) {                
                e.defaultprevented;
                displayPage($(this).attr('rel'));                
            });
            //clique sur précedent
            $('.easyPaginateNav a.prev', plugin).live('click', function(e) {                
                e.defaultprevented;
                page = plugin.settings.currentPage > 1?parseInt(plugin.settings.currentPage) - 1:1;
                displayPage(page);
				return false;
            });
            // clique sur Suivant
            $('.easyPaginateNav a.next', plugin).live('click', function(e) {                
                e.defaultprevented;
 
                page =plugin.settings.currentPage < plugin.settings.pages?parseInt(plugin.settings.currentPage) + 1:plugin.settings.pages;
                displayPage(page);
				return false;
            });
        };
ici c la fonction displayPage(), j'essaie de faire quelque chose genre $("table").prepend("entête de ma table") a chaque fois qu'on change la page, mais ça ne fonctionne pas.
Code javascipt : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
        var displayPage = function(page, forceEffect) {
            if(plugin.settings.currentPage != page) {
                plugin.settings.currentPage = parseInt(page);
                if(plugin.settings.currentPage==1)
                    {
                    var entete="<thead><th>COLONNE 1</th></thead>";
                    var sortie;
                        plugin.settings.objElements.prepend(entete);                       
                    }
                offsetStart = (page -1) * (plugin.settings.elementsPerPage);
                offsetEnd = page * plugin.settings.elementsPerPage;
                if(typeof(forceEffect) != 'undefined') {
                    eval("transition_"+forceEffect+"("+offsetStart+", "+offsetEnd+")");
                }else {
                    eval("transition_"+plugin.settings.effect+"("+offsetStart+", "+offsetEnd+")");
                }
 
                plugin.nav.find('.current').removeClass('current');
                plugin.nav.find('a.page:eq('+(page - 1)+')').addClass('current');
 
                switch(plugin.settings.currentPage) {
                    case 1:
                        $('.easyPaginateNav a', plugin).removeClass('disabled');
                        $('.easyPaginateNav a.first, .easyPaginateNav a.prev', plugin).addClass('disabled');
                        break;
                    case plugin.settings.pages:
                        $('.easyPaginateNav a', plugin).removeClass('disabled');
                        $('.easyPaginateNav a.last, .easyPaginateNav a.next', plugin).addClass('disabled');
                        break;
                    default:
                        $('.easyPaginateNav a', plugin).removeClass('disabled');
                        break;
                }
            }
        };
 
        var transition_default = function(offsetStart, offsetEnd) {
            plugin.currentElements.hide();
            plugin.currentElements = plugin.settings.objElements.slice(offsetStart, offsetEnd).clone();
            plugin.el.html(plugin.currentElements);
            plugin.currentElements.show();
        };
 
        var transition_fade = function(offsetStart, offsetEnd) {
            plugin.currentElements.fadeOut();
            plugin.currentElements = plugin.settings.objElements.slice(offsetStart, offsetEnd).clone();
            plugin.el.html(plugin.currentElements);
            plugin.currentElements.fadeIn();
        };
 
        var transition_slide = function(offsetStart, offsetEnd) {
            plugin.currentElements.animate({
                'margin-left':  plugin.settings.slideOffset * -1,
                'opacity': 0
            }, function() {
                $(this).remove();
            });
 
            plugin.currentElements =plugin.settings.objElements.slice(offsetStart, offsetEnd).clone();
            plugin.currentElements.css({
                'margin-left': plugin.settings.slideOffset,
                'display': 'auto',
                'opacity': 0,
                'min-width': plugin.el.width() / 2
            });
            plugin.el.html(plugin.currentElements);
            plugin.currentElements.animate({
                'margin-left': 0,
                'opacity': 1
            });
        };
 
        var transition_climb = function(offsetStart, offsetEnd) {            
            plugin.currentElements.each(function(i) {
                var $objThis = $(this);
                setTimeout(function() {
                    $objThis.animate({
                        'margin-left': plugin.settings.slideOffset * -1,
						//'max-width': 30,
						'opacity': 0
                    }, function() {
                        $(this).remove();
                    });
                }, i * 200);
            });
 
            plugin.currentElements = plugin.settings.objElements.slice(offsetStart, offsetEnd).clone();
            plugin.currentElements.css({
                'margin-left': plugin.settings.slideOffset * -1,
				//'margin-left': 'auto',
                'display': 'auto',
				//'position': 'relative',
                'opacity': 0,
				//'width': 20+'em',
				//'max-width':40+'em',
                //'min-width': plugin.el.width() / 2
            });
			//èèèèèèèèèèèèèèèèèèèèèèèèèèèèèèè
 
			//'''''''''''''''''''''''''''''
            plugin.el.html(plugin.currentElements);
            plugin.currentElements.each(function(i) {
                var $objThis = $(this);
                setTimeout(function() {
                    $objThis.animate({
                        'margin-left': 0,
						'display' : 'auto',
                        'opacity': 1
                    });
                }, i * 200);
            });
        };
 
        plugin.settings = $.extend({}, defaults, options);
 
        plugin.currentElements = $([]);
        plugin.settings.objElements =  plugin.el.find(plugin.settings.paginateElement);
        plugin.settings.pages = getNbOfPages();
        if(plugin.settings.pages > 1) {
        plugin.el.html();
 
            // Here we go
            displayNav();
 
            page = 1;
            if(document.location.hash.indexOf('#'+plugin.settings.hashPage+':') != -1) {
                page = parseInt(document.location.hash.replace('#'+plugin.settings.hashPage+':', ''));
                if(page.length <= 0 || page < 1 || page > plugin.settings.pages) {
                    page = 1;
                }
            }
 
            displayPage(page, 'default');
        }
    });
};
})(jQuery);
quelqu'un pourrait m'aider s'il vous plait?