jQuery UI 1.6 The User Interface Library for jQuery phần 3

Một đối tượng tạo ra Dưới sự kiểm soát kịch bản. JavaScript cho phép người sử dụng (hoặc kịch bản phát triển thực sự) để tạo các đối tượng riêng của họ, tài sản,Trong một trang mới trong trình soạn thảo văn bản của bạn, thêm các luật sau: | Chapter 3 posuere mauris at sodales rutrum turpis tellus fermentum metus ut bibendum velit enim eu lectus. Suspendisse potenti. div div div a id header3 href 3 Header 3 a div Donec at dolor ac metus pharetra aliquam. Suspendisse purus. Fusce tempor ultrices libero. Sed quis nunc. Pellentesque tincidunt viverra felis. Integer elit mauris egestas ultricies gravida vitae feugiat a tellus. div div div script type text javascript src script script type text javascript src ui script script type text javascript src ui script script type text javascript function to execute when doc ready function configure accordion var accOpts event mouseover active header3 alwaysOpen false autoHeight false navigation true turn specified element into an accordion myAccordion .accordion accOpts script body html Save the changes as . When you roll over one of the headings they will still open as normal but if you click on one of the headings the URL specified as the header s href attribute will be followed. With navigation enabled the widget will check for a fragment identifier at the end of the URL when the page loads. If there is a fragment identifier the accordion will open the drawer whose heading s href attribute matches the fragment. So if the second heading is clicked in this example and then the page is refreshed the second drawer of the accordion will be opened automatically. Therefore it is important to ensure that the href attributes for each accordion header is unique to avoid conflicts in this situation. 71 The Accordion Widget Accordion methodology The accordion includes a selection of methods that allow you to control and manipulate the behavior of the widget programmatically. Some of the methods are common to each component of the library such as the destroy method which is used by every widget. We ll look at each of these methods in turn. Destruction One method provided by

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.