Notes on "sharp jQuery"-Four Sections, sharp jquery

Source: Internet
Author: User

Notes on "sharp jQuery"-Four Sections, sharp jquery

Chapter 8

1. When the parent element is set to position: relative, the child element is set to position: absolute. This child element is set to any position of the parent element.

Chapter 9

1. Correct the visible area and notify the browser to use the width of the mobile device as the width of the visible area.

<Metaname = "viewport" content = "width = device-width, initial-scale = 1, user-scalable = no"/>

2. Adding the framework Sequence

<Link rel = "stylesheet" href = "css/jquery.mobile.css"/> <script type = "text/javascript" src = "js/jquery. min. js "> </script> <! -Add other js here --> <script type = "text/javascript" src = "js/jquery. mobile. js"> </script>

 

3. data-role = ""

1) page: page container

2) navbar: navigation bar

3) listview: List

4) header: page title container

5) footer: Page footer container

6) slider: text box with a range value

7) content: content container

8) collapsible: container of the package title and content

9) collapsible-set: the container that wraps collapsible

10) button: A link element that shares the attributes of a button.

11) fieldcontain: package container, containing the label/form Element pair

4. data-rel = "dialog": dialog Box

5. type = "checkbox/radio/text | number | search"

6. Set ul's data-inset = "true", and the width will not be 100%.

Chapter 10

1. version 1.6:

Prop indicates the dynamic state information of the element, such as the content of the dynamic output text box.

2. 1.7:

  • On () replaces bind (), delegate (), live ()
  • Off () replaces unbind (), undelegate (), unlive ()

3. e.tar get can capture the triggered target element.

Eg:

$(“#myTab td”).click(function(){$(this).css(‘background’,’red’);})

 

For example, if there are many, it will be annoying to lock

After improvement:

$(“#myTab td”).click(function(e){    var $click = e.target;$click.css(‘background’,’red’);})

 

4. jQuery. fu. [method name] = function (){

// Code

Return this;

}

5. Disable all animations:

jQuery.fx.off = true;

 

6. Switching style: toggleClass ("")

 

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.