10 กุมภาพันธ์ 2555, 05:36:05
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. 08-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: jQuery page scrolling  (อ่าน 949 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general เมื่อ: 29 มิถุนายน 2553, 00:07:57

HTML:
โค๊ด: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Papermashup.com | jQuery Offset Animation</title>
<link href="../style.css" rel="stylesheet" type="text/css" />


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"></script>
<script type="text/javascript">
$("document").ready(function() {

$('.top-title').click(function(){
 
$('html, body').animate({
scrollTop: $(".middle").offset().top
}, 2000);  

 
});



$('.middle-title').click(function(){
 
$('html, body').animate({
scrollTop: $(".bottom").offset().top
}, 2000);  

 
});


$('.bottom-title').click(function(){
 
$('html, body').animate({
scrollTop: $(".top").offset().top
}, 2000);  

 
});

});
</script>

<style>

.top, .middle, .bottom{
padding:30px;
}

.top{
height:300px;
background-color:#FFC;
margin-bottom:30px;
border:2px solid #FF9;
}


.middle{
height:300px;
background-color:#FF9;
border:2px solid #FF6;
margin-bottom:30px;
}


.bottom{
height:300px;
background-color:#FF6;
border:2px solid #FF3;
margin-bottom:30px;
}

.top-title, .middle-title, .bottom-title{
cursor:pointer;
margin-top:290px;
text-align:center;
text-decoration:underline;
font-size:32px;
font-weight:700;}
</style>
</head>
<body>
<div class="main">


<div class="top">

<div class="top-title">Click Here to go to the middle box</div>

</div>

<div class="middle">

<div class="middle-title">Click Here to go to the bottom box</div>

</div>

<div class="bottom">

<div class="bottom-title">Click Here to go to the top box</div>

</div>

</div>

</body>
</html>

ลิงค์หัวข้อ: http://dexmore.com/topic/2205
Windows XP    Firefox 3.6.6   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 7 กุมภาพันธ์ 2555, 19:30:22

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla