Article Introduction: in this article, let's take a deep look at the button component of jquery Mobile, which lets you familiarize yourself with the dynamic creation buttons, disable buttons, and enable buttons. |
This article gives us a deep understanding of the button component of jquery Mobile
The main to familiarize people with the dynamic create buttons, disable buttons, and enable buttons
Add: If you are still unfamiliar with the button, http://www.webjx.com/javascript/jsajax-33547.html
1. Dynamic Create button
Example:
Dynamically create $ ("#dynamic_button"). Bind (' click ', Function () { //Once Oh if ($ ("#dynamic_button_new"). Length < 1) { //Create a button, insert to the back of the ID test_checkbox var str = ' <button id= ' dynamic_button_new ' > Dynamically added button </button > '; $ (str). InsertAfter ("#test_checkbox"); You can set the subject: $ ("#dynamic_button_new"). Button ({ theme: "E" })
Description
1, the dynamic creation of a link button is unable to invoke the following disable and enable to do related operations
2, disable (disabled)
Example:
Disable $ ("#disable_button"). Bind (' click ', function () {
3, enable (enabled)
Example:
Enable $ ("#enable_button"). Bind (' click ', function () {
Demo