Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. <script type="text/javascript">
  2. $(function(){
  3.  
  4. $("ul a").click(function(){
  5. pagina = $(this).attr('href')
  6.  
  7. $("#meio").load(pagina);
  8. return false;
  9. })
  10. })
  11. </script>
  12.  
  13. <div id="meio" style="width:768px; margin:0 auto; overflow:scroll;height:100%;"></div>
  14.  
  15. <script type="text/javascript">
  16. var pagina = "";
  17. <!-- aqui vc muda o tempo de espera -->
  18. var espera = 10;
  19.  
  20. function mostra(){
  21. if(tempo < 1){
  22. if(pagina != "publicidade"){
  23. pagina = "publicidade";
  24. $("#meio").load("publicidade.php");
  25. }
  26. }
  27. else{
  28. tempo --;
  29. }
  30. }
  31. var tempo = espera;
  32. $(document).scroll(function(){
  33. tempo = espera;
  34. });
  35. $(document).mousemove(function(){
  36. tempo = espera;
  37. });
  38. $(document).click(function(){
  39. tempo = espera;
  40. });
  41. $(document).mousedown(function(){
  42. tempo = espera;
  43. });
  44. $(document).ready(function(){
  45. setInterval(mostra, 1000);
  46.  
  47. });
  48. </script>
  49.  
  50. <script type="text/javascript">
  51.  
  52. $(document).ready(function(){
  53. $("#slide").click(function(){
  54. $("#meio").load("menu.php");
  55. pagina = "";
  56. tempo = espera;
  57. });
  58. });
  59. </script>
  60.  
  61. <script type="text/javascript">
  62. $(function(){
  63. $('#slides').slides({
  64. preload: false,
  65. preloadImage: 'img/loading.gif',
  66. play: 10000,
  67. hoverPause: false,
  68. animationStart: function(current){
  69. $('.caption').animate({
  70. bottom:-35
  71. },100);
  72. if (window.console && console.log) {
  73. // example return of current slide number
  74. console.log('animationStart on slide: ', current);
  75. };
  76. },
  77. animationComplete: function(current){
  78. $('.caption').animate({
  79. bottom:0
  80. },200);
  81. if (window.console && console.log) {
  82. // example return of current slide number
  83. console.log('animationComplete on slide: ', current);
  84. };
  85. },
  86. slidesLoaded: function() {
  87. $('.caption').animate({
  88. bottom:0
  89. },200);
  90. }
  91. });
  92. });
  93.  
  94. </script>
  95.  
  96. <script>
  97. $(document).on('click', function(){
  98.  
  99. $("#meio").load('menu.php');
  100. })
  101. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement