Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,025

HOME > jQuery > jQuery Effects > .slideUp() - Effects , jQuery



Clound SSD Virtual Server

.slideUp() - Effects , jQuery

.slideUp() เป็นการใช้ Effects กับ .slideUp() ใช้สำหรับการควบคุมการเคลื่อนไหว element ให้ทำการเลื่อนขึ้นข้างบน

Syntax
.slideUp( [duration,] [callback] )
.slideUp( [duration,] [easing,] [callback] )



Example 1 ตัวอย่างการใช้งาน .slideUp()

EffectsslideUp1.html


<html>
<head>
<title>ThaiCreate.Com jQuery Tutorials</title>
<style>
  div { background:#3d9a44; margin:3px; width:80px; 
    height:40px; float:left; }
</style>
<script type="text/javascript" src="jquery-1.6.4.js"></script>
<script type="text/javascript">
		$(document).ready(function(){

			  $(document.body).click(function () {
				if ($("div:first").is(":hidden")) {
				  $("div").show("slow");
				} else {
				  $("div").slideUp();
				}
			  });

		});
</script>
</head>
<body>

  Click me!
  <div></div>
  <div></div>
  <div></div>
  <div></div>

  <div></div>

</body>
</html>



Screenshot

.slideUp()

คำอธิบาย (ภาษาไทย)
จากตัวอย่างเป็นการใช้ Effects กับ .slideUp() ในการจัดการกับ element ที่อ้างถึง



Example 2 ตัวอย่างการใช้งาน .slideUp()

EffectsslideUp2.html


<html>
<head>
<title>ThaiCreate.Com jQuery Tutorials</title>
<style>
  div { margin:2px; }
</style>
<script type="text/javascript" src="jquery-1.6.4.js"></script>
<script type="text/javascript">
		$(document).ready(function(){

			  $("button").click(function () {
				$(this).parent().slideUp("slow", function () {
				  $("#msg").text($("button", this).text() + " has completed.");
				});
			  });

		});
</script>
</head>
<body>

  <div>
  <button>Hide One</button>
  <input type="text" value="One" />

</div>
<div>
  <button>Hide Two</button>
  <input type="text" value="Two" />

</div>
<div>
  <button>Hide Three</button>
  <input type="text" value="Three" />

</div>
<div id="msg"></div>

</body>
</html>



Screenshot

.slideUp()

คำอธิบาย (ภาษาไทย)
จากตัวอย่างเป็นการใช้ Effects กับ .slideUp() ในการจัดการกับ element ที่อ้างถึง








ลิ้งค์ที่ควรศึกษา
Go to : jQuery Selectors : jQuery Selectors and Element
Go to : jQuery Effects : jQuery and Effects


เกี่ยวกับบทความ
ส่วนหนึ่งของบทความได้เรียบเรียงและแปลจากเว็บไซต์ jQuery.Com โค้ดตัวอย่างคำสั่งนี้อยู่ภายใต้สัญญาอนุญาตของ GFDL สามารถนำโค้ดและคำสั่งใช้งานได้ฟรี สงวนลิขสิทธิ์เฉพาะคำอธิบายภาษาไทย


   
Share


ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2011-09-22 21:44:56 / 2017-03-19 14:08:06
  Download : No files
 Sponsored Links / Related

 
.animate() - Effects , jQuery
Rating :

 
.clearQueue() - Effects , jQuery
Rating :

 
.delay() - Effects , jQuery
Rating :

 
.dequeue() - Effects , jQuery
Rating :

 
.fadeIn() - Effects , jQuery
Rating :

 
.fadeOut() - Effects , jQuery
Rating :

 
.fadeTo() - Effects , jQuery
Rating :

 
.fadeToggle() - Effects , jQuery
Rating :

 
jQuery.fx.interval - Effects , jQuery
Rating :

 
jQuery.fx.off - Effects , jQuery
Rating :

 
.hide() - Effects , jQuery
Rating :

 
.queue() - Effects , jQuery
Rating :

 
.show() - Effects , jQuery
Rating :

 
.slideDown() - Effects , jQuery
Rating :

 
.slideToggle() - Effects , jQuery
Rating :

 
.stop() - Effects , jQuery
Rating :

 
.toggle() - Effects , jQuery
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่