Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. /* JavaScript Document */
  2. (function() {
  3. var user = navigator.userAgent;
  4. if ((user.indexOf('iPhone') || user.indexOf('iPad') || user.indexOf('iPod') || user.indexOf('Android')) > 0) {
  5. location.href = './pass';
  6. } else {
  7. void(0);
  8. }
  9. }());
  10.  
  11. $(document).ready(function() {
  12. $('#top').particleground({
  13. dotColor: 'rgba(0, 120, 255, 0.5)',
  14. lineColor: 'rgb(0, 255, 0)',
  15. });
  16. });
  17.  
  18. function current() {
  19. var now = new Date();
  20. var time = [now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()];
  21. var day_of_the_week = ['日', '月', '火', '水', '木', '金', '土'];
  22.  
  23. time[1] += 1;
  24.  
  25. for (var i=1; i<=5; i++) {
  26. if (time[i] < 10) time[i] = '0' + time[i];
  27. }
  28. var set_year = time[0] + '/' + time[1] + '/' + time[2] + ' (' + day_of_the_week[now.getDay()] + ')';
  29. var set_time = time[3] + '時' + time[4] + '分' + time[5] + '秒';
  30.  
  31. return [ set_year, set_time ];
  32. };
  33.  
  34. setInterval(function() {
  35. $('div.list_td_ym').html(current()[0]);
  36. $('div.list_td_time').html(current()[1]);
  37. }, 1000);
  38.  
  39. $(function() {
  40. var count = 0;
  41.  
  42. $('#month_design, #login_design').mouseover(function() {
  43. $(this).css('border-left', 'solid 25px rgba(0, 0, 200, 0.8)');
  44. $(this).mouseout(function() { $(this).css('border', 'none') });
  45. });
  46.  
  47. $('#month_design').click(function() {
  48. if (count % 2 == 0) {
  49. $('#md').slideDown(450);
  50. } else {
  51. $('#md').slideUp(400);
  52. };
  53. count ++;
  54. });
  55. });
  56.  
  57. $(function() {
  58. var h = $(window).height();
  59. $('#now_loading ,#loader').height(h).css('display', 'block');
  60. });
  61. $(window).load(function () {
  62. $('#now_loading').delay(700).fadeOut(600);
  63. $('#loader').delay(600).fadeOut(300);
  64. });
  65.  
  66. $(function(){
  67. setTimeout('stopload()',5000);
  68. });
  69. function stopload(){
  70. $('#now_loading').delay(700).fadeOut(600);
  71. $('#loader').delay(500).fadeOut(300);
  72. };
  73.  
  74. $(function() {
  75. $(window).scroll(function() {
  76. var now_place = $(window).scrollTop();
  77. var under_place = $('body').height() - (now_place + $(window).height());
  78.  
  79. if (now_place > 1500 && under_place > 200)
  80. $('#page_top').fadeIn(300);
  81. else
  82. $('#page_top').fadeOut(280);
  83. });
  84.  
  85. $('#move_page_top').click(function() {
  86. $('html, body').animate( { scrollTop: 0 }, 400 );
  87. });
  88. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement