Zepto.js is a minimalist JavaScript framework for mobile WebKit browsers, with a jQuery-compatible syntax.


Docs & Download : https://github.com/madrobby/zepto

Zepto.js: a minimalist framework for mobile WebKit browsers

Zepto.js is a minimalist framework for mobile WebKit browsers, with a jQuery-compatible chaining syntax.

100% jQuery coverage is not a design goal, however all APIs provided match their jQuery counterparts.

The ultimate goal is to have a ~5k library that handles most basic dredge work for you in a nice API so you can concentrate on getting stuff done.

Primary target platforms are:

  • iOS 4+
  • Android 2.2+
  • webOS 1.4.5+

Secondary platforms (for plugin/extension development) are:

  • Safari 5+ (desktop)
  • Chrome 5+ (desktop)
  • Other WebKit-based browsers/runtimes

Syntax & features:

Basic call with CSS selector:

  $('p>span').html('yoho').css('color:red');

Instead of a selector, a DOM Element, or a list of nodes can be passed in.

The $ function takes an optional context argument, which can be a DOM Element or a Zepto object:

  $('span', $('p'))  // -> find all <span> elements in <p> elements

  $('p').bind('click', function(){
    $('span', this).css('color:red'); // affects "span" children/grandchildren
  });

Context and .find calls are equivalent:

  $('span', $('p'))    // same
  $('p').find('span')  // same

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/05 16:28 2011/04/05 16:28
, ,
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6051

Trackback URL : http://tcbs17.cafe24.com/tc/trackback/6051

« Previous : 1 : ... 421 : 422 : 423 : 424 : 425 : 426 : 427 : 428 : 429 : ... 6391 : Next »

블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2024/11   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Statistics Graph

Site Stats

Total hits:
236060
Today:
529
Yesterday:
195