Search This Blog

Wednesday, January 9, 2013

Day4 - Web Mobile and HTML5

putting script src tag such as
<script src="xx.js"></script> in the end of the html , its good for UI performance , the user experience is better because he see something first.

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

//on re-size do something

var someFunc = function(){
$('myElement').html('******');
}

$(window).on('resize',someFunc);

jQuery mobile framework takes the "write less, do more" mantra to the next level: Instead of writing unique apps for each mobile device or OS, the jQuery mobile framework allows you to design a single highly-branded web site or application that will work on all popular smartphone, tablet, and desktop platforms.

ppt could be found here http://www.slideshare.net/YnonPerek/04-jquery-mobile

in JQM (jQuery mobile) this is the tree of mobile pages:
data-role="page"   - mobile page
---data-role="header"   - header of the page
---data-role="content"   - content of the page

---data-role="footer"   - footer of the page

(data-position="fixed" set the footer/header on the bottom/top of screen and the content in the middle)

JQM start guide

JQM is very popular for forms in the web, you can just add tree line in the header (include , css ..) and your forms will looks better.

set the type on input fields - will help to the user.
type="tel" - open number keyboard
type="email" - will make sure its email
type="text" - regular keyboard.

jqm is very sensitive with the spell of element (id,names,..etc), it will fail to work if you will make any mistake.



No comments: