TAILIEUCHUNG - JQuery: Novice to Ninja- P27

JQuery: Novice to Ninja- P27:No matter what kind of ninja you are—a cooking ninja, a corporate lawyer ninja, or an actual ninja ninja—virtuosity lies in first mastering the basic tools of the trade. Once conquered, it’s then up to the full-fledged ninja to apply that knowledge in creative and inventive ways. | Plugins Themes and Advanced Topics 367 Attach our data object to the JavaScript pin object locator .data pin_datal locationData Now at a future point when the user clicks on the map and the locator s click handler fires we ll have access to the locationData object Later when a location is clicked. var currentData clickedLocation .data pin_data We can retrieve the metadata stored on the object alert You selected the location Although in many cases we d probably want to store the element reference in the object itself when the objects are coming from third-party code you have to be very careful with adding or removing properties. As well since any changes the third party makes in the future could affect your code it s best to play it safe. The data action lets us augment the object without changing it. Theme Rolling Throughout the preceding pages we ve traversed and conquered much of the jQuery UI API. One of the most attractive features of jQuery UI is . its attractiveness Out of the box the UI components look great and as much as we might hate to admit it looking great is incredibly important. Sometimes it can be even more important than the functionality itself There s nothing worse than showing a colleague or boss a technically brilliant proof of concept for a control you ve created only to be met with criticism about its design. Worse still sometimes your lack of initial thought regarding skinning and theming results in a product that s inherently difficult to style. This is not a problem for jQuery UI components there s a gallery of themes avail-able and picking or customizing a new funky design is simple thanks to the ThemeRoller web ThemeRoller lets you tweak design and download jQuery UI themes. Additionally if you follow some simple conventions when creating your own controls you can easily take advantage of existing and customized themes to ensure everything you create looks as awesome as it works. 1 http .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.