hola gracias por las respuestas, bueno estube mirando y el paginador que mensiono tiene una variable js que se llama members que es un archivo members.js el cual contiene esto:
members.js
Código Javascript
:
Ver originalvar members = [
['Fred G. Aandahl', '1951-1953', 'North Dakota', 'Republican', '1897-1966'],
['Watkins Moorman Abbitt', '1948-1973', 'Virginia', 'Democratic', '1908-1998'],
['Amos Abbott', '1843-1849', 'Massachusetts', 'Whig', '1786-1868'],
['Jo Abbott', '1887-1897', 'Texas', 'Democratic', '1840-1908'],
['Joel Abbott', '1817-1825', 'Georgia', 'Democratic-Republican', '1776-1826'],
['Josiah Gardner Abbott', '1876-1877', 'Massachusetts', 'Democratic', '1841-1891'],
['Nehemiah Abbott', '1857-1859', 'Maine', 'Republican', '1804-1877'],
['James Abdnor', '1973-1981', 'South Dakota', 'Republican', '1923-'],
['Pete Abele', '1963-1965', 'Ohio', 'Republican', '1916-2000'],
['James Abercrombie', '1851-1855', 'Alabama', 'Whig', '1795-1861'],
['John Abercrombie', '1913-1917', 'Alabama', 'Democratic', '1866-1940'],
];
y se usa asi:
Código Javascript
:
Ver original<script type="text/javascript" src="members.js"></script>
<script type="text/javascript">
// This file demonstrates the different options of the pagination plugin
// It also demonstrates how to use a JavaScript data structure to
// generate the paginated content and how to display more than one
// item per page with items_per_page.
/**
* Callback function that displays the content.
*
* Gets called every time the user clicks on a pagination link.
*
* @param {int}page_index New Page index
* @param {jQuery} jq the container with the pagination links as a jQuery object
*/
function pageselectCallback(page_index, jq){
// Get number of elements per pagionation page from form
var items_per_page = $('#items_per_page').val();
var max_elem = Math.min((page_index+1) * items_per_page, members.length);
var newcontent = '';
// Iterate through a selection of the content and build an HTML string
for(var i=page_index*items_per_page;i<max_elem;i++)
{
newcontent += '<dt>' + members[i][0] + '</dt>';
newcontent += '<dd class="state">' + members[i][2] + '</dd>';
newcontent += '<dd class="party">' + members[i][3] + '</dd>';
}
// Replace old content with new content
$('#Searchresult').html(newcontent);
// Prevent click event propagation
return false;
}
// The form contains fields for many pagiantion optiosn so you can
// quickly see the resuluts of the different options.
// This function creates an option object for the pagination function.
// This will be be unnecessary in your application where you just set
// the options once.
function getOptionsFromForm(){
var opt = {callback: pageselectCallback};
// Collect options from the text fields - the fields are named like their option counterparts
$("input:text").each(function(){
opt[this.name] = this.className.match(/numeric/) ? parseInt(this.value) : this.value;
});
// Avoid html injections in this demo
var htmlspecialchars ={ "&":"&", "<":"<", ">":">", '"':"""}
$.each(htmlspecialchars, function(k,v){
opt.prev_text = opt.prev_text.replace(k,v);
opt.next_text = opt.next_text.replace(k,v);
})
return opt;
}
// When document has loaded, initialize pagination and form
$(document).ready(function(){
// Create pagination element with options from form
var optInit = getOptionsFromForm();
$("#Pagination").pagination(members.length, optInit);
// Event Handler for for button
$("#setoptions").click(function(){
var opt = getOptionsFromForm();
// Re-create pagination content with new parameters
$("#Pagination").pagination(members.length, opt);
});
});
</script>
Y lo que quisiera saver es si se puede usar php y mysql para mostrar datos, y si es asi, como seria?? gracias...