Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: madrobby/zepto
...
head fork: madrobby/zepto
compare: v1.0rc1
Commits on Aug 21, 2011
@gobhi gobhi When there's a tap the swipe event is fired on Nokia Symbian and Play…
…book tablet devices (this should not be the case since this is just a tap and not a swipe). Instead of checking if x2 and y2 are > 0, just checking to see if they are defined fixes this issue. Also re-factored the code a bit by moving the delta comparison in the conditional check. This has been tested on Playbook, Nokia Symbian, iPad and iPhone devices.
7d4f016
@gobhi gobhi When there's a tap, the swipe event is fired on Nokia Symbian and Pla…
…ybook tablet devices (this should not be the case since this is just a tap and not a swipe). It seems that there is a slight move when tap event is fired on these devices, so touch.x2 and touch.y2 get set. But because the delta comparison Math.abs(touch.x1 - touch.x2) > 30) and Math.abs(touch.y1 - touch.y2) > 30) are inside the conditional block that checks if touch.x2 or touch.y2 > 0, the last conditional else if ('last' in touch) is never reached. Moving the delta comparison in the conditional check fixes this issue. This has been tested on Playbook, Nokia Symbian, iPad and iPhone devices
b2e75d2
Commits on Sep 23, 2011
@elsigh elsigh Edited src/ajax.js via GitHub f192bd0
@elsigh elsigh Edited README.rdoc via GitHub 940e2ba
Commits on Oct 31, 2011
@elsigh elsigh Update test/ajax.html 6acd08d
Commits on Nov 26, 2011
@tristandunn tristandunn correct ajaxComplete argument order for JSONP abort and timeout 3436b3f
@pamelafox pamelafox remove misleading "you need to include touch.js"
"touch.js" is included in the default distribution
423b753
@pamelafox pamelafox add eq() to docs 51748e7
@pamelafox pamelafox docs: width() is equivalent to jQuery outerWidth() 6e563ed
@pamelafox pamelafox document recently added on/off() to README a92b7a4
@pamelafox pamelafox docs: extend() can be used with multiple objects e6d7962
@mislav mislav it's not WebKit-only anymore 71182cf
@mislav mislav remove confusing note about "extension development" 3d3ccb3
@aglemann aglemann Fixes fragment func f16459a
@mislav mislav fix $.each context
Closes #295
e796f30
@mislav mislav exclude FIELDSET elements from serializeArray()
This affected Google Chrome.

Closes #340
4da02ac
Commits on Nov 27, 2011
@madrobby for functional tests, show the userAgent to make it easier to compare…
… cross-platform/version results
6a110b7
@madrobby Add BlackBerry Tablet OS as a primary supported platform 14c31af
Commits on Dec 01, 2011
@davidkaneda davidkaneda Add new singleTap event, modify behavior for firing tap.
Allows devs to use either "tap" or "singleTap," depending on whether they want to use the 250ms "buffer" for a doubleTap.

Also cache the element for performance, and avoid the target keyword.
664aa8f
@madrobby Merge pull request #346 from davidkaneda/master
Modification to tap behavior
92c8c6d
Commits on Dec 04, 2011
@madrobby Merge pull request #282 from elsigh/zepto
---

Conflicts:
	README.rdoc
c2580e3
Commits on Dec 05, 2011
@renaudleo renaudleo Correct misleading instructions in README f7aac74
Commits on Dec 20, 2011
@madrobby new example for the holidays 9028de5
@madrobby whitespace 5c54c97
@madrobby garbage collect 8840a02
Commits on Dec 27, 2011
@edtsech edtsech add $.inArray() 9e0be09
Commits on Jan 15, 2012
@madrobby Merge pull request #354 from renaudleo/master
Correct misleading instructions in README
8db66e2
@madrobby adjust copyright years 5eaef37
Commits on Feb 08, 2012
@dbrockman dbrockman Calling get() without an index return array of all elements found (ac…
…cording to documentation). The problem was that it returned the zepto object (not a real array).
ffd144b
Commits on Feb 09, 2012
@dstokes dstokes return empty array when querying invalid node type 5179f9b
Commits on Feb 12, 2012
@madrobby Merge pull request #393 from dstokes/master
Return an empty array when querying an invalid nodeType
9d08034
Commits on Feb 13, 2012
@dbrockman dbrockman added tests for method get b932aa4
Commits on Feb 14, 2012
@madrobby Merge pull request #391 from dbrockman/patch-1
Calling get() without an index return array of all elements found
a8a656f
Commits on Feb 15, 2012
@madrobby snow example fix 83ce326
@madrobby Merge branch 'master' of github.com:madrobby/zepto ec97396
@madrobby JSONP requests that hit a 404 will now correctly invoke the error cal…
…lback. Fixes #388. (thanks @thijs for the patch)
0c7be15
@madrobby JSONP requests that hit a 404 will now correctly invoke the error cal…
…lback. Fixes #388.

Thanks @tvandervossen for the patch.
896014d
@madrobby Merge branch 'master' of github.com:madrobby/zepto 6f80dae
Commits on Feb 21, 2012
@joelambert joelambert Added support for `blur` & `focus` in `delegate()`
Manipulated `blur` & `focus` into `focusout` & `focusin` so that the events bubble and can be caught.
8738892
@joelambert joelambert Added support for `blur` and `focus` in `delegate` for Firefox ab2a3ef
@chevalric chevalric made $.fn.load more compatible with jQuery
in jQuery, $.fn.load doesn't execute scripts when a selector is used.
This commit adds that behaviour to Zepto.js
ad2cde9
Commits on Feb 22, 2012
@drale2k drale2k added 'singleTap' event to README db4d4b6
@drale2k drale2k added 'singleTap' event to README d209312
@drale2k drale2k added 'singleTap' event to README ef8c73f
@drale2k drale2k added 'singleTap' event to README 4b81fef
@drale2k drale2k added 'singleTap' event to README 6133eab
@chevalric chevalric added tests for updated load method 1f59e42
Commits on Feb 27, 2012
@i8ramin i8ramin Update README to include some basic instructions to edit/run the unit…
… tests.
5e7efdd
Commits on Feb 28, 2012
@madrobby ignore some more dirs 0a96d17
@madrobby Merge pull request #411 from i8ramin/zepto
---

The current README file lacks any documentation on how to run the unit tests. There seem to be two different set of tests as well. I am not sure if I have covered everything here, but please update the docs with better information on how to run the tests and how to determine if they all pass.
672bf5a
@madrobby update readme 0d3a799
@madrobby Merge pull request #403 from chevalric/zepto
---

The jQuery load() function strips out scripts when a selector is used, i.e. 
$(".page").load("/some/path/to/page.html #page") wont execute any scripts in the loaded url, but 
$(".page").load("/some/path/to/page.html") will execute the script.

The attached pull request copies this behaviour to Zepto.js
a3d20bf
@madrobby whitespace 433df87
Commits on Feb 29, 2012
@bengourley bengourley Set relevant transition props instead of 'all' 6fe39a0
Commits on Mar 05, 2012
@danjordan danjordan Cancelled longTap timeout if touchmove is detected ea9759c
Commits on Mar 07, 2012
@johnboxall johnboxall Expect $(domElement1, domElement2) to return [domElement1] like jQuery. 62a192c
Commits on Mar 13, 2012
@LeoDutra LeoDutra Smaller assets (removed unneccessary diff test). 47dd29d
@LeoDutra LeoDutra Smaller dectect.js. Inline optimizations. 90b36ca
Commits on Mar 17, 2012
@madrobby Merge pull request #405 from drale2k/master
Added documentation for the "singleTap" event to README
b5b9b41
@madrobby Update README.md b7795fd
@madrobby Merge pull request #402 from joelambert/master
Added support for `blur` and `focus` when used with the `delegate()` function
1e036fc
@madrobby show number of assertions when running unit tests 8f1834f
@madrobby Merge pull request #434 from LeoDutra/patch-2
Smaller assets.js (removed unneccessary diff test).
0d73393
@madrobby Merge pull request #435 from LeoDutra/patch-3
Smaller dectect.js. Inline optimizations.
ab055cc
Commits on Mar 19, 2012
@ccoenen ccoenen Fixing transitionEnd-Event Bubble-Error Issue #305 a1daca6
Commits on Mar 20, 2012
@ccoenen ccoenen Adding a test and a minor fix to fx, bubbling-fix now doesn't break
0-duration anim.
8aaeff1
@madrobby Merge pull request #444 from meso-unimpressed/anim-bubble-issue305
Fixing transitionEnd-Event Bubble-Error Issue #305
43dccd7
Commits on Mar 28, 2012
@madrobby remove trailing semicolons in core 4624c71
@madrobby more purging 0366f9a
@madrobby no one escapes the austrian inquisition 68cbe1f
@madrobby add semicolon-less rules d499e2a
@madrobby be nice 415f88a
@madrobby remove closure compiler and yui compressor, go uglifyjs 18f8a47
@madrobby remove semicolons in tests 3a8e945
@madrobby remove semicolons from examples 4826dc6
@madrobby stylistic fixes 8c22096
@madrobby more cleanups to make code more delectable 96a0ef4
@madrobby some more little cleanups 87bd3ba
@i8ramin i8ramin calling val() on non existent element should return undefined 27f33dc
@i8ramin i8ramin extend should not copy over undefined values df87f78
Commits on Mar 29, 2012
@madrobby Merge pull request #457 from i8ramin/val-undefined
calling val() on non existent element should return undefined
c30b800
@madrobby Merge pull request #458 from i8ramin/extend-undefined
extend should not copy over undefined values
876eaa1
@madrobby Merge branch 'master' into semicolon-purge
Conflicts:
	src/zepto.js
	test/zepto.html
353e9db
@madrobby fix semicolons in README 41fe2cd
@madrobby move end() and andSelf() are now in the stack.js plugin 9e03f25
Commits on Mar 30, 2012
@madrobby add public/ to .gitignore b3547a8
@madrobby make $() wrap JS objects, only trigger events on DOM elements; fixes #… b25065c
Commits on Mar 31, 2012
@madrobby add $.isPlainObject; closes #443 4bb0332
@madrobby add tests for and fix isFunction on Chrome; fixes #461 61230f5
@madrobby clean up semicolons in zepto.html unit test file d10a88d
Commits on Apr 01, 2012
@madrobby remove jasmine-based tests (we will add this back later) a889a8f
@madrobby Update the README to point to the new documentation site. 8b96474
Commits on Apr 02, 2012
@madrobby add example of falling back to jQuery 5050523
@madrobby fix whitespace cd00805
@madrobby shorter 9c95803
@mikekelly mikekelly Use isFunction not typeof within isPlainObject c9215ff
@madrobby detect the silk browser (needs more cleanup work, see the todo in det…
…ect.js)
e97d100
Commits on Apr 03, 2012
@gingertom gingertom Updating 'data' method to return undefined when there is no data asso…
…ciated with that key. This is consistent with jQuery documentation and also flows through to cause the same result when using the data extension.
ef08167
@gingertom gingertom Update src/data.js to allow the storing of functions as data. This is…
… consistent with the JQuery documentation.
850342f
@gingertom gingertom Update tests to correct behaviour when setting functions and to test …
…for an atribute that doesn't exist.
3016827
Commits on Apr 04, 2012
@madrobby return a new array from $() calls with no nodes returned, as mentione…
…d in #448
4a0c619
@madrobby Expose an API for extending/overriding Zepto internals as $.zepto.ini…
…t, $.zepto.fragment, $.zepto.Z and $.zepto.isZ, which make it possible to extend/patch Zepto via plugins to support more environments
39c073c
@madrobby Start to document the source with docco. 09f21d3
@madrobby more docco docs 3242a48
@madrobby fix $.each logic; fix $.zepto.qsa reference in event.js 0a8a589
@madrobby Merge pull request #463 from mikekelly/master
Use isFunction not typeof within isPlainObject
9eaa28a
@madrobby Merge pull request #426 from johnboxall/zepto
---

Sometimes we anchor Zepto to a particular DOM element to make querying easier eg:

    function anchor(context) {
        return function(selector) {
            return Zepto(selector, context)
        }
    }

    var $ = anchor(domElement)
    $(h1)
    $(otherDomElement)

Currently passing a DOM element and a context results in an error.

Conflicts:
	src/zepto.js
	test/zepto.html
5f52009
@gregorymostizky gregorymostizky css(property,'') removes the style as in jquery - both usage cases c711f8d
@madrobby Merge pull request #467 from hardbap/zepto
---

Patch from @gregorymostizky for #327 with tests.
5f4eebd
@madrobby Describe how to build custom Zepto versions 1735732
Commits on Apr 05, 2012
@bengourley bengourley Merge https://github.com/madrobby/zepto
Conflicts:
	src/fx.js
	test/fx.html
1bf1e46
@bengourley bengourley Fully remove transition related properties rather than setting sensib…
…le defaults
6982ad7
@mislav mislav rewrite Readme to be more succinct & to the point 19895fa
@mislav mislav linkify modules to their source files 8f0298d
Charles Stuart add ability to set data attributes via .data(obj) 134ea10
Charles Stuart whitespace e15477b
@madrobby Merge pull request #465 from gingertom/zepto
---

Ive made two changes that make Zepto more like the documentation and functionality of jQuery as Zepto is designed to be a drop in replacement for the functions it supports I consider this to be a positive change.

1st Change. When getting $elem.data("missing") on a real element but for a piece of data that was never set the old return value was null. However jQuery returns undefined. This change means that with or without the data extension the retuned value is now undefined.

2nd Change. This one is more controversial but I feel that its the right thing to do. Currently when data is passed a function to store the function is immediately evaluated and the result of that function is stored, this is not what jQuery does and makes very inconvenient to store functions. This change allows for the storage of functions, in line with jQuery.

Ive included updated test that reflect both of these changes.
72b9513
@madrobby remove code to detect 3D CSS support on WebKit because of side effect…
…s; just use normal scale CSS instead. Fixes #377
a38473c
@madrobby Merge pull request #421 from danjordan/zepto
---

Im unsure whether longTap should fire when scrolling. To counteract this Ive cleared the longTap timeout if touchmove is detected.

Conflicts:
	src/touch.js
d4bd9e6
@madrobby fix #407 a96836d
@mislav mislav add $.proxy()
References #462
6e7a3e5
Oliver Morgan ajax: respect Content-Type of the response if `dataType` isn't set
So if dataType is not set, and the response type is "application/json",
the response text will now get parsed as JSON.

Fixes #331
7da082e
@mislav mislav ajax: clean up appending query string to URL 8aa6364
@mislav mislav ajax: improve response type handling
references #332
6529cc0
Commits on Apr 06, 2012
@mislav mislav refactor all rake tasks to be more rake-y 6b8fc41
@mislav mislav include edge revision in dist file, exclude copyright info 3eff37c
@mislav mislav ajax: add support for 'jsonp' dataType
Closes #367
7572f37
@buger buger ajax: add `data` support for JSONP
Appends data to the URL as query string, just as in normal `$.ajax()` calls.

Example:

  $.ajax({
    url: "http://example.com/api.json?callback=?",
    data: {
      "user": "Tod",
      "age": "26"
    }
  })
86a7881
@mislav mislav ajax: improve serializing GET query string data
References #356
1a62509
@mislav mislav ajax: work around Chrome CORS bug when data is empty
Fixes #319
08e1b7c
@mislav mislav it's zeptojs.com 877a5cc
@mislav mislav prove that one can create OPTION elements via `$()`
Issue exists in Firefox 3.6 but not in newer versions.

Closes #373
9f08cca
@arextar arextar have `filter()` and `is()` use `matchesSelector` if available
Fall back to performing `$$()` when not available.
5f68109
@mislav mislav cleanup `matches()` function, fix failing `is()` test 52ebf4a
@mislav mislav rewrite `closest()` to take advantage of `matches()` function
This fixes using `closest` on detached DOM fragments.

Fixes #378
cf9bbd3
@mislav mislav improve dealing with DOM fragments and orphans
When DOM elements are generated via `$()`, they are now immediately
orphaned (previously they belonged to a temporary internal element).

When trying to insert DOM nodes around an orphan via `before()` or
`after()`, they now become orphaned too (instead of the operation being
a no-op).

Fixes #417
f680984
Commits on Apr 07, 2012
@arextar arextar more tests for `is()` on an orphan element
references #326
3fed3c1
@madrobby add a simple touch events example dc1a70e
@mislav mislav don't choke on HTML comments when creating DOM fragments
Fixes #427
cff4f0f
@mislav mislav slight cleanup of wrapping text nodes 2211954
@nickzoic nickzoic `append()` & family can accept multiple arguments
fixes #413
3473f65
@mislav mislav add test for `append()` with multiple arguments 3f7331c
@mikekelly mikekelly allow Content-Type to be set for ajax requests via headers 4f37a06
@mislav mislav ajax: simplify setting Content-Type
references #472
ad7f4f9
Commits on Apr 08, 2012
@madrobby Merge pull request #416 from bengourley/zepto
---

If you want to instantaneously alter the CSS of an element while some of its properties are being animated with a call to zeptos `animate()` function, the alteration to the CSS is animated too. This is because the transition was set using the shorthand syntax where only one property can be applied and all was used, eg.: `transition: all 0.3s ease-in-out;`.

I have factored out the transition into the more explicit components, `transition-property`, `transition-duration` and `transition-timing-function` so that only the properties that are modified in the call to `animate()` are transitioned.

This fixes my use case where an element that had an animation sprite as its background (so no transition required on `background-position`), was animated across the screen (transition required on `transform`).

I have updated the test `fx.html` to reflect this change.
4d27333
@mislav mislav support camelized names in `data()` method
  - `data('fooBar')` reads from "data-foo-bar" attribute
  - data.js plugin is improved to store keys in camelCase form

Closes #471
2fb231b
@mislav mislav data module: have initial data hold "data-*" attribute values
closes #470
4cf3020
@mislav mislav add `removeData()` method to data module
closes #383
cfe8b33
@madrobby Merge pull request #259 from gobhi/zepto
---

When theres a tap, the swipe event is fired on Nokia Symbian and Playbook tablet devices (this should not be the case since this is just a tap and not a swipe).

It seems that there is a slight move when tap event is fired on these devices, so touch.x2 and touch.y2 get set.  But because the delta comparison Math.abs(touch.x1 - touch.x2) > 30) and Math.abs(touch.y1 - touch.y2) > 30) are inside the conditional block that checks if touch.x2 or touch.y2 > 0, the last conditional "else if (last in touch)" is never reached.  Moving the delta comparison in the conditional check fixes this issue.

This has been tested on Playbook, Nokia Symbian, iPad and iPhone devices.

Conflicts:
	src/touch.js
bda8af4
@madrobby add automated unit tests for touch module; missing longtap and specif…
…ic swipe directions
f315264
@madrobby Use simulated touch events to enable testing of touch events on devic…
…es that do not or not properly support generating touch events
1d3fa22
@madrobby remove debug code c0c8d8b
@mislav mislav add `fn.prop()` ade7931
@mislav mislav improve Ember.js compatibility
references #462
60c7919
@mislav mislav enable overriding internal core functions such as `$.zepto.qsa()`
Previously some of core functionality referenced them via local
variables, meaning overriding them on the `$.zepto` object wouldn't have
effect. This removes such local variables.
7f43ed1
@mislav mislav experimental support for jQuery CSS pseudo-selectors
fixes #323
f716bad
@madrobby start to refactor touch.js and add more tests (test for #454 is faili…
…ng for now)
ce2a4ea
Commits on Apr 09, 2012
@mislav mislav show how to build with "selector" module e8a5510
@mislav mislav expose "selector" module filters as `$.zepto.cssFilters` 76d324e
@mislav mislav add `fn.clone()` eb4808b
@arextar arextar don't try to manipulate attributes on non-element nodes
fixes #312
fba5d36
@mislav mislav add more tests for `attr()`, `removeAttr()`
references #473
98609c0
@mislav mislav trash legacy headless runner support code 7576bfc
@mislav mislav get Zepto version string from `git describe` 3f6172d
@mislav mislav `rake test` runs tests with PhantomJS 5f221a2
@mislav mislav fix `rake docco`
We can't generate individual files since that breaks docco's
jump-to-file feature.
4e2690f
@hardbap hardbap Ajax: HTTP 304 status code should not be treated as error.
This adds a test for issue #386.
b8f4762
@mislav mislav handle null selector passed to `on()` & `off()`
fixes #400
ba883a7
@mislav mislav one more `on()` test 671a350
@mislav mislav framework ☞ library df641c3