El código de la pag. web:
Código HTML:
Ver original
<!DOCTYPE html> <html lang="ES-es"> <head> <meta charset="utf-8"> <!-- Stylesheets --> <link rel="stylesheet" href="js/fancybox/jquery.fancybox.css"> <link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet'> <link rel="stylesheet" href="css/style.css"> <!-- Optimize for mobile devices --> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <!-- jQuery & JS files --> <script type="text/javascript"> ShowRecords(1,"sucursal"); </script> </head> <body> <!-- TOP BAR --> <div id="top-bar"> <div class="page-full-width cf"> <ul id="nav" class="fl"> <ul> </ul> </li> </ul> <!-- end nav --> </div> <!-- end full-width --> </div> <!-- end top-bar --> <!-- HEADER --> <div id="header-with-tabs"> <div class="page-full-width cf"> <ul id="tabs" class="fl"> </ul> <!-- end tabs --> <!-- Change this image to your own company's logo --> <!-- The logo will automatically be resized to 30px height. --> </div> <!-- end full-width --> </div> <!-- end header --> <!-- MAIN CONTENT --> <div id="content"> <div class="page-full-width cf"> <div class="side-menu fl"> <ul> </ul> </div> <!-- end side-menu --> <div class="side-content fr"> <div class="content-module"> <div class="content-module-heading cf"> </div> <!-- end content-module-heading --> <div class="content-module-main"> </div> <!-- end content-module-main --> </div> <!-- end content-module --> <!-- end content --> <!-- FOOTER --> <div id="footer"> </div> <!-- end footer --> </body> </html>
el código javascript:
Código Javascript:
Ver original
$(function(){ function ShowLoader(){ $("#waiting-div").fadeIn(function (){ $("#waiting-div").css("display","block"); }); } function HideLoader(){ $("#waiting-div").fadeOut(function(){ $("#waiting-div").css("display","none"); }); } function ShowRecords(page,table){ $.post('private/ShowRecord.php',{page:page,table:table},function(msg){ $(".content-module-main").html(msg); }); } $("pagination-list a").on("click",function(){ var actual_pag=$(".active").attr("id"); var page=$(this).attr("id"); var table=$("#table").val(); if (actual_pag!=page) { ShowLoader(); ShowRecords(page,table); HideLoader(); } }); })