Set button options in javascript in jQueryMobile

Source: Internet
Author: User
Tags button attributes
The options and properties of a button are the same in terms of functions and effects. The difference is that the attribute is declared in the html tag, and the option is the option value assigned in javascript code by locating a button through the jQuery selector. In terms of naming, the options and button attributes of the Option name are usually the same in terms of functions and implementation effects. The difference is that the attribute is declared in the html tag, and the option is the option value assigned in javascript code by locating a button through the jQuery selector. In terms of naming, the option name is usually the meaning of the operation to be performed, for example, the icon, and the attribute name will add "data-" as the prefix, for example, data-icon. As an attribute, the icon that defines a button is implemented in this way. As an option, in JavaScript, the option is used in this way, $ ("button "). buttonMarkup ({icon: "plus"}); jQuery ("button "). buttonMarkup ({icon: "plus"}); Option name option type default value function label attribute corners boolean true defines the button as the rounded corner button and sets it to true, otherwise, the right button is set to false. The data-cornersicon string null defines the button icon. The default value is the position of the data-iconiconpos string left button icon without the icon. The default value is left or can be customized. Data-iconposiconshadow boolean true button icon Shadow status, true-shadow, false-shadow-free data-iconshadowinline boolean false/null embedded button style, false-non-embedded (Inline) button, the data-inlineshadow boolean specifies the Shadow status of the buttons equal to the width of the mobile device screen and the "true"-embedded button. The value true indicates shadow, and the value false indicates that the data-shadowtheme string parameter is null, the default button style inherited from the upper-level is null, indicating that the button style inherited from the upper-level div or section. If no style is defined at the upper level, the default style is used. The style is defined from a to e, and 5 different color styles are defined. Data-themeinitSelector css selector string button, [type = 'click'], [type = 'submit '], [type = 'reset'], [type = 'image'] specifies the CSS selector. None

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.