jQuery UI API - ผลกระทบเชื่อมโยงไปถึง (Drop ผล)
หมวดหมู่
การใช้
คำอธิบาย: เชื่อมโยงไปถึงผลกระทบ (Drop ผล) ถึงทิศทางเดียวของภาพนิ่งหลุดลอกออกมาเพื่อซ่อนหรือแสดงองค์ประกอบแสง
drop
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
direction | String | 隐藏元素时元素降落的方向,显示元素时元素出现的方向。 可能的值:up、down、left、right。 |
"left" |
ตัวอย่าง
ผลกระทบการใช้ประโยชน์ที่ดิน (ตาบอดผล) เปลี่ยน div
<! Doctype html> <html lang = "th"> <head> <Meta charset = "UTF-8"> <title> ผลกระทบ Landing (Drop ผล) สาธิต </ title> <link rel = "สไตล์ชีต" href = "// code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <style> #toggle { ความกว้าง: 100px; ความสูง: 100px; พื้นหลัง: # CCC; } </ style> <script src = "// code.jquery.com/jquery-1.10.2.js"> </ script> <script src = "// code.jquery.com/ui/1.10.4/jquery-ui.js"> </ script> </ head> <body> <p> คลิกที่ใดก็ได้ที่จะเปลี่ยน </ p> <div id = "สลับ"> </ div> <script> $ (เอกสาร) จำนวนคลิก (ฟังก์ชั่น () { $ ( "#toggle") .toggle ( "วาง"); }); </ script> </ body> </ html>