블로그 이미지
Magic_kit
study 관련자료를 한곳으로 자기 개발 목적으로 재태크 재무 관리 목적으로 일상생활의 팁을 공유 하기 위하여 블로그를 개설 하였습니다.

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Category

Recent Post

Recent Comment

Archive

2009. 11. 12. 14:36 .Net Project/Jquery 1.3.2
반응형
 SlideExample1.htm
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

                    "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Example</title>

  <style type="text/css">

  div {

    position:absolute;

    background-color:#abc;

    left:50px;

    width:90px;

    height:90px;

    margin:5px;

  }

  </style>

  <script src="http://code.jquery.com/jquery-latest.js"></script>

 

  <script type="text/javascript">

      $(document).ready(function () {

 

          $("#right").click(function () {

              $(".block").animate({ "left": "+=50px" }, "slow");

          });

 

          $("#left").click(function () {

              $(".block").animate({ "left": "-=50px" }, "slow");

          });

 

      });

  </script>

 

</head>

<body>

  <button id="left">«®i</button>

  <button id="right">»®i</button>

<div class="block"></div>

 

</body>

</html>

 

 



 SlideExample2.htm
 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

                    "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title></title>

 <style type="text/css">

  div {

    background-color:#bca;

    width:200px;

    height:1.1em;

    text-align:center;

    border:2px solid green;

    margin:3px;

    font-size:14px;

  }

  button {

    font-size:14px;

  }

  </style>

 

  <script src="http://code.jquery.com/jquery-latest.js"></script>

 

  <script type="text/javascript">

      $(document).ready(function () {

 

          $("#go1").click(function () {

              $("#block1").animate({ width: "90%" },
               { queue:
false, duration: 3000 })

         .animate({ fontSize: "24px" }, 1500)

         .animate({ borderRightWidth: "15px" }, 1500);

          });

 

          $("#go2").click(function () {

              $("#block2").animate({ width: "90%" }, 1000)

         .animate({ fontSize: "24px" }, 1000)

         .animate({ borderLeftWidth: "15px" }, 1000);

          });

 

          $("#go3").click(function () {

              $("#go1").add("#go2").click();

          });

 

          $("#go4").click(function () {

              $("div").css({ width: "", fontSize: "", borderWidth: "" });

          });

 

      });

  </script>

 

</head>

<body>

  <button id="go1">» Animate Block1</button>

  <button id="go2">» Animate Block2</button>

  <button id="go3">» Animate Both</button>

  <button id="go4">» Reset</button>

  <div id="block1">Block1</div>

  <div id="block2">Block2</div>

</body>

</html> 










반응형
posted by Magic_kit