Advertisement
Szwarny-Czarodziej

index.html

Dec 5th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 5.81 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.         <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  5.         <script>
  6.             function myFunction() {
  7.                 $("#h01").html("Hello jQuery");
  8.             }
  9.  
  10.  
  11.             $(document).ready(myFunction);
  12.             $(document).ready(function() {
  13.                 $("#hide").click(function() {
  14.                     $(".p_class").hide();
  15.                 });
  16.             });
  17.             $(document).ready(function() {
  18.                 $("#show").click(function() {
  19.                     $(".p_class").show();
  20.                 });
  21.             });
  22.             $(document).ready(function() {
  23.                 $("#toggle").click(function() {
  24.                     $(".p_id").toggle();
  25.                 });
  26.             });
  27.             $(document).ready(function() {
  28.                 $("button").click(function() {
  29.                     $(this).hide();
  30.                 });
  31.             });
  32.             $(document).ready(function() {
  33.                 $(".external .internal").click(function() {
  34.                     $(this).parents(".external").hide("slow");
  35.                 });
  36.             });
  37.             $(document).ready(function() {
  38.                 $("#p1").mousedown(toggle);
  39.                 $("#p1").mouseup(toggle);
  40.             });
  41.  
  42.             $(document).ready(function() {
  43.                 $("#flip").click(function() {
  44.                     $("#panel").slideToggle("fast");
  45.                 });
  46.             });
  47.  
  48.             $(document).ready(function() {
  49.                 var div = $("#animatedDiv");
  50.                 div.animate({
  51.                     height : '300px',
  52.                     opacity : '0.4'
  53.                 }, "slow");
  54.                 div.animate({
  55.                     fontSize : '30pt'
  56.                 }, "slow");
  57.                 div.animate({
  58.                     width : '300px',
  59.                     opacity : '0.8'
  60.                 }, "fast");
  61.                 div.animate({
  62.                     height : '100px',
  63.                     opacity : '0.4'
  64.                 }, "slow");
  65.                 div.animate({
  66.                     width : '100px',
  67.                     opacity : '0.8'
  68.                 }, "fast");
  69.  
  70.                 div.animate({
  71.                     height : '300px',
  72.                     opacity : '0.4'
  73.                 }, "slow");
  74.                 div.animate({
  75.                     width : '300px',
  76.                     opacity : '0.8'
  77.                 }, "fast");
  78.                 div.animate({
  79.                     height : '100px',
  80.                     opacity : '0.4'
  81.                 }, "slow");
  82.                 div.animate({
  83.                     width : '100px',
  84.                     opacity : '0.8'
  85.                 }, "fast");
  86.  
  87.                 div.animate({
  88.                     height : '300px',
  89.                     opacity : '0.4'
  90.                 }, "slow");
  91.                 div.animate({
  92.                     width : '300px',
  93.                     opacity : '0.8'
  94.                 }, "fast");
  95.                 div.animate({
  96.                     height : '100px',
  97.                     opacity : '0.4'
  98.                 }, "slow");
  99.                 div.animate({
  100.                     width : '100px',
  101.                     opacity : '0.8'
  102.                 }, "fast");
  103.  
  104.                 div.animate({
  105.                     height : '300px',
  106.                     opacity : '0.4'
  107.                 }, "slow");
  108.                 div.animate({
  109.                     width : '300px',
  110.                     opacity : '0.8'
  111.                 }, "fast");
  112.                 div.animate({
  113.                     height : '100px',
  114.                     opacity : '0.4'
  115.                 }, "slow");
  116.                 div.animate({
  117.                     width : '100px',
  118.                     opacity : '0.8'
  119.                 }, "fast");
  120.  
  121.                 div.animate({
  122.                     height : '300px',
  123.                     opacity : '0.4'
  124.                 }, "slow");
  125.                 div.animate({
  126.                     width : '300px',
  127.                     opacity : '0.8'
  128.                 }, "fast");
  129.                 div.animate({
  130.                     height : '100px',
  131.                     opacity : '0.4'
  132.                 }, "slow");
  133.                 div.animate({
  134.                     width : '100px',
  135.                     opacity : '0.8'
  136.                 }, "fast");
  137.             });
  138.  
  139.             $(document).ready(function() {
  140.                 $("#stop").click(function() {
  141.                     $("div").stop(true, true);
  142.                 });
  143.             });
  144.  
  145.             $(document).ready(function() {
  146.                 $("#contentButton").click(function() {
  147.                     alert("Zawarto??: " + parseInt($("#skladnik1").val() + $("#skladnik2").val()));
  148.                 });
  149.             });
  150.  
  151.             function toggle() {
  152.                 $("#div1").fadeToggle();
  153.                 $("#div2").fadeToggle("slow");
  154.                 $("#div3").fadeToggle(3000);
  155.             }
  156.         </script>
  157.         <meta charset="utf-8">
  158.  
  159.         <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
  160.         Remove this if you use the .htaccess -->
  161.         <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  162.  
  163.         <title>new_file</title>
  164.         <meta name="description" content="">
  165.         <meta name="author" content="56327">
  166.  
  167.         <meta name="viewport" content="width=device-width; initial-scale=1.0">
  168.  
  169.         <!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
  170.         <link rel="shortcut icon" href="/favicon.ico">
  171.         <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  172.  
  173.         <style>
  174.             #panel, #flip {
  175.                 padding: 5px;
  176.                 text-align: center;
  177.                 background-color: #e5eecc;
  178.                 border: solid 1px #c3c3c3;
  179.             }
  180.             #panel {
  181.                 padding: 50px;
  182.                 display: none;
  183.             }
  184.         </style>
  185.  
  186.         <div id="flip">
  187.             Kliknij, ?eby wy?wietli? panel
  188.         </div>
  189.         <div id="panel">
  190.             Witaj!
  191.         </div>
  192.     </head>
  193.  
  194.     <body>
  195.         <div>
  196.             <header>
  197.                 <h1 id="h01">new_file</h1>
  198.                 <h2>This is a heading</h2>
  199.                 <p class="p_id">
  200.                     This is paragraph.
  201.                 </p>
  202.                 <p class="p_id">
  203.                     This is another paragraph.
  204.                 </p>
  205.                 <p class="p_class">
  206.                     Paragraf pierwszy.
  207.                 </p>
  208.                 <p class="p_class">
  209.                     Paragraf drugi.
  210.                 </p>
  211.                 <button id="hide">
  212.                     Click me
  213.                 </button>
  214.                 <button id="show">
  215.                     Don't click me!
  216.                 </button>
  217.                 <button id="toggle">
  218.                     Toggle
  219.                 </button>
  220.             </header>
  221.             <div class="external">
  222.                 <p>
  223.                     Po klikni?ciu przycisku panel zostanie ukryty
  224.                 </p>
  225.                 <button class="internal">
  226.                     Ukryj panel
  227.                 </button>
  228.             </div>
  229.             <div class="external">
  230.                 <p>
  231.                     Po klikni?ciu przycisku panel zostanie ukryty
  232.                 </p>
  233.                 <button class="internal">
  234.                     Ukryj panel
  235.                 </button>
  236.             </div>
  237.             <div id="div1" style="width:80px;height:80px;display:none;background-color:red;"></div>
  238.             <br>
  239.             <div id="div2" style="width:80px;height:80px;display:none;background-color:green;"></div>
  240.             <br>
  241.             <div id="div3" style="width:80px;height:80px;display:none;background-color:blue;"></div>
  242.             <p id="p1">
  243.                 Wskazanie paragrafu spowoduje wy?wietlenie elementów
  244.             </p>
  245.  
  246.             <button id="stop">
  247.                 zatrzymaj animacj?
  248.             </button>
  249.  
  250.             <div id="animatedDiv" style="background:#98bf21; height:100px;width:100px;position:relative;">
  251.                 OK
  252.             </div>
  253.  
  254.             <p id="par1" >
  255.                 <b><i>Oprogarmowanie komputerowe</i></b>
  256.             </p>
  257.  
  258.             <button id="contentButton">
  259.                 contentButton
  260.             </button>
  261.  
  262.             <input type="text" id="skladnik1" value="123" />
  263.             <input type="text" id="skladnik2" value="123" />
  264.  
  265.             <nav>
  266.                 <p>
  267.                     <a href="/">Home</a>
  268.                 </p>
  269.                 <p>
  270.                     <a href="/contact">Contact</a>
  271.                 </p>
  272.             </nav>
  273.  
  274.             <div>
  275.  
  276.             </div>
  277.  
  278.             <footer>
  279.                 <p>
  280.                     &copy; Copyright  by 56327
  281.                 </p>
  282.             </footer>
  283.         </div>
  284.     </body>
  285. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement