jquery Mobile Tutorial: The button component of jquery Mobile

Source: Internet
Author: User
Tags bind

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



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.