Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: madrobby/zepto
base: v0.7
...
head fork: madrobby/zepto
compare: v0.8
Commits on Aug 03, 2011
Mislav Marohnić mislav fix filter() and is() for elements without parentNode d24e26a
Mislav Marohnić mislav fix anim() callback being executed in the context of element
fixes #250
dc5157e
Commits on Aug 05, 2011
Sasha Koss kossnocorp Added failing assertion for issue #209 b19bb98
Sasha Koss kossnocorp Allow to set timeout for ajax request (closes #209) 562d79d
Sasha Koss kossnocorp More assertions for #209 6ef94c0
Sasha Koss kossnocorp Added more info to $.ajax docs ecf9ff0
Commits on Aug 08, 2011
Sasha Koss kossnocorp Added failing assertion to keyframe animation start via $.fn.anim c2b3ea1
Sasha Koss kossnocorp Added ability to run keyframe animations via $.fn.anim 8e8f2ca
Zoz zoz trim whitespace from html fragment when using $("<xxx>...</xxx>") to …
…create dom element
b9ea32f
Commits on Aug 09, 2011
Sasha Koss kossnocorp Merge pull request #252 from zoz/master
Trim whitespace from html fragment when using $("<xxx>...</xxx>") to create dom element
c0f48ec
Commits on Aug 11, 2011
Sasha Koss kossnocorp Bundle Jasmine gem 14071a2
Sasha Koss kossnocorp Setup rake with bundler 41c24ee
Sasha Koss kossnocorp Bundle rake ebafc9d
Sasha Koss kossnocorp Init Jasmine a50f962
Sasha Koss kossnocorp Write example spec for ajax.js b3f6cfe
Sasha Koss kossnocorp Remove example jasmine's files 197a072
Sasha Koss kossnocorp Install mock-ajax.js 2e61314
Sasha Koss kossnocorp Write adaptation for Zepto in mock-ajax.js 47e7a7f
Sasha Koss kossnocorp Allow to specify xhr transport fd81b81
Sasha Koss kossnocorp Fix typo in mock-ajax helper 0cee6ae
Sasha Koss kossnocorp Make mock-ajax for Zepto finally works 21976ef
Sasha Koss kossnocorp Allow to specify xhr transport 9162a1d
Commits on Aug 12, 2011
Sasha Koss kossnocorp Basic examples for all ajax functions 04af6bc
Commits on Aug 15, 2011
Ross Hale Fixing rails compatibility in ajax requests with mimetype 'applicatio…
…n/json' that return an empty body (as in "head :ok")
a822d60
Sasha Koss kossnocorp Use proper animation end event f683448
Thomas Fuchs Merge pull request #256 from SocialStay/zepto
---

In Rails, specifying "head :ok" or "render => :nothing" returns a single space instead of an empty string in the response body.  This commit checks xhr.responseText against the single space case.  Tests included!
9709c35
Thomas Fuchs merge #256 and adapt test condition 28a9087
Commits on Aug 17, 2011
Sasha Koss kossnocorp Failing assertion for #258 c354f88
Sasha Koss kossnocorp Fix issue #258 0362528
Sasha Koss kossnocorp Added failing assertions for pull request #257 d4128b8
Alex Wilson arextar Added special initialization of mouse events 406bd31
Sasha Koss kossnocorp Rename special_events to specialEvents fba76a0
Sasha Koss kossnocorp Fixed assertion for #257 594f22a
Sasha Koss kossnocorp Fix code style of specialEvents defenition e0fd490
Commits on Sep 01, 2011
Mislav Marohnić mislav fix `return false` cancels event even in delegated handlers 2a7af98
Mislav Marohnić mislav refactor $.param() so it also accepts data from serializeArray() 9e42ee4
Mislav Marohnić mislav enable checking `event.defaultPrevented` after trigger()
This enables us to create a custom event object, trigger it and check
if any of its handlers cancelled it. Essential stuff.

WebKit implements `defaultPrevented` but in Firefox it's missing.
45e3271
Commits on Sep 02, 2011
Mislav Marohnić mislav refactor attr() to support empty attributes and more input field types
Changes:
 - for empty attributes (e.g. `<div data-empty>`) it now returns an empty string
 - for non-existent attributes it now returns null instead of undefined
 - attr('value') now uses the `value` property directly for all input
   types, not just `<input type="text">`
ca85920
Mislav Marohnić mislav val(value) now accepts a function argument 1f90bcb
Romain Ruetschi romac add-on with a new $.fn.data() method which can store non-scalar values 285471b
Mislav Marohnić mislav simplify Readme docs for the basic data() method 2cfd0f0
Mislav Marohnić mislav improve extended data() functionality
Changes:
 - original data() method isn't publicly accessible as dataAttr() anymore
 - the setter method never writes to the "data-*" DOM attribute,
   not even for scalar values
 - the setter method now affects every element in the collection
 - the setter method now accepts function argument for value
 - fixes the getter method in case of empty collection
0085682
Mislav Marohnić mislav fix data() setter; data() getter w/out arguments returns all data 4305a2d
Mislav Marohnić mislav `rake concat` now accepts arguments to modify which components get in…
…cluded

Arguments are a colon-separated list of component names. If a name
starts with a minus sign ("-"), that component will be excluded.

Example use:

  rake concat                # default distribution
  rake concat[data:gesture]  # include "data" and "gesture" components
  rake concat[assets:-fx]    # include "assets" but exclude "fx"
5786e6e
Commits on Sep 03, 2011
Alex Wilson arextar Implemented .andSelf cec28ca
Sasha Koss kossnocorp Added failing assertion for #262 6cd3cbf
Sasha Koss kossnocorp Merge branch 'arexkun-master' e85cb7e
Sasha Koss kossnocorp Added $.ajaxSettings specs a51f876
Sasha Koss kossnocorp Added basic $.ajax specs a8cc48f
Sasha Koss kossnocorp Specs for $.ajax callbacks 777126b
Sasha Koss kossnocorp Added specs for $.get aeb6680
Sasha Koss kossnocorp Bundle jasmine-headless-webkit gem bbf0c2f
Sasha Koss kossnocorp jasmine-headless-webkit won't work without setting options in jasmine…
….yml
a330528
Sasha Koss kossnocorp Clean up jasmine.yml file 4edac6f
Sasha Koss kossnocorp Specs now works in browser and headless-webkit f47e446
Sasha Koss kossnocorp Fix bug in minified version, thanks for @ranbena (closes #164) a6bf149
Commits on Sep 04, 2011
Charles Fulnecky cmelion correct Ajax timeout behavior
Before the Ajax timeout behavior was this:
 - wait "timeout" ms;
 - check the results of the beforeSend method;
 - abort if the result is false, otherwise send.

The end result was that the request is simply delayed for "timeout" ms.
This is behavior is useless.

Now the timeout behavior is:
  - send the Ajax request right away;
  - if it finishes before timeout, nothing special happens;
  - if "timeout" ms passes before the request has finished,
    cancel the request, call the "error" handler and ensure
    that no further ajax callbacks get called.

Properly fixes #209, closes #253
41e6999
Mislav Marohnić mislav refactor Ajax sending with regard to timeout f1ef348
Mislav Marohnić mislav improve $.param(), add support for "traditional" (shallow) mode
The second argument to $.param() is now a boolean that activates
"traditional" serialization, i.e. without brackets for array keys:

  $.param({ a:[1,2,3] }, true)  //=> "a=1&a=2&a=3"

The refactored method now also supports objects nested inside arrays
when in normal (recursive) serialization mode.

Closes #208
1812477
Ran Ben Aharon ranbena add abort() functionality for $.ajaxJSONP db82675
Mislav Marohnić mislav ensure $.get(), $.post(), $.getJSON() all return xhr objects e7bc9fe
Mislav Marohnić mislav test ajax timeout behavior 6b7f9ad
Mislav Marohnić mislav refactor JSONP fetching; ensure that <script> elements are cleaned up 0b183b2
Mislav Marohnić mislav support "timeout" setting for JSONP b53c104
Commits on Sep 05, 2011
Mislav Marohnić mislav fix functionality of slightly outdated examples 87bd885
Linus Unnebäck LinusU add "context" option to $.ajax
"context" is the scope in which all Ajax callbacks will be executed.
The default is null, which means default context is the window object.
9b55901
Commits on Sep 08, 2011
Matt Powell fauxparse fix 2nd argument to toggleClass(name, bool)
The boolean parameter indicates whether the class should be added or removed.
3796abf
Mislav Marohnić mislav performance boost for $.qsa(), Zepto's main query function
Uses regexes to test whether one of the following is more appropriate:
 - getElementById
 - getElementsByTagName
 - getElementsByClassName

Performance was tested doing various queries on a page with a large
number of nested elements.

Measured overall performance improvement:
 - iOS (iPhone 3Gs): 17%
 - Safari:           33%
 - Chrome:           38%
 - Firefox:          96%

Closes #180
85d9238
Commits on Sep 10, 2011
Mislav Marohnić mislav fix delegate(), one() handlers receiving multiple data arguments
Refactor delegate() & one() to fix how they forward data arguments to
the event handler they are wrapping.

Also fixes `return false` in one().
9610403
Mislav Marohnić mislav ensure that event test handlers are unbinded after each test
This required grouping events test together in a separate test case,
resulting in a massive diff.
835a194
Mislav Marohnić mislav event methods now support event names & handlers passed as an object
Example:
  $(document.body).bind({
    click: function(e) { ... },
    keypress: function(e) { ... }
  })

Closes #199
06609ad
Commits on Sep 11, 2011
Mislav Marohnić mislav retouch test suites, display the test run outcome on the page
Also looks decent on mobile
1292b3e
Mislav Marohnić mislav fix accidental globals d961e2c
Commits on Sep 13, 2011
Mislav Marohnić mislav fix $.Event(type, {bubbles:false}) cross-browser
Opera doesn't allow event.bubbles to be set directly as a property.
556b401
Mislav Marohnić mislav fix checking of leaked globals in Opera
In Opera, every DOM element with an ID has window[id] pointing to id.
Ignore this; don't treat them as global variables.
e6ecfbb
Mislav Marohnić mislav tweak detect.js implementation and improve tests d76c4ae
Aeron Glemann aglemann add $.fn.insertBefore() & insertAfter()
insertBefore and insertAfter are inverse operators of before() and
after()
55ace7b
Aeron Glemann aglemann slim down replaceWith() 4b85e47
Commits on Sep 19, 2011
Mislav Marohnić mislav improve $.fn.width() & height() to work on window & document objects 1edbad5
Mislav Marohnić mislav enable $.fn.anim() in Firefox, Opera, and IE 069569b
Commits on Sep 20, 2011
Mislav Marohnić mislav implemented animated show(), hide(), fadeIn/Out methods in an add-on
Overloads show(), hide() and toggle() to be optionally animated.
Adds fadeIn(), fadeOut(), fadeToggle() and fadeTo() methods.

Uses scale3d transform on browsers that support it.

Closes #264
461a62c
Mislav Marohnić mislav fadeOut() sets "display:none" on element upon completion 23907bb
Mislav Marohnić mislav fix `return false` in delegate event handlers
This was a regression in 9610403
95d2748
Mislav Marohnić mislav improve $(document).ready(), pass Zepto as 1st argument to handlers
Now it also fires immediately during "interactive" state.

Closes #159, closes #278
089f788
Commits on Oct 09, 2011
Matthias Wilhelm kertal remove duplicate ID in iphone example 10ff6a7
Ross Hale replaceWith, wrap, before, after: make all of them noop on fragments
Nodes in a fragment have no parent so these operations aren't possible.
Making them a noop ensures they don't error out.
3b280fd
Mislav Marohnić mislav add tests for before() & after() behavior on fragments 96681a7
Mislav Marohnić mislav unified event handling with fn.on() & off()
Usage:
  $('el').on(event, handler)
  $(document).on(event, selector, handler)

Matches jQuery 1.7 API.

Closes #286
e8d04b9
Commits on Oct 15, 2011
Messiahs Messiahs Change viewport (from seperator ; to ,) 640b321
Thomas Fuchs Merge pull request #290 from Messiahs/patch-1
Change viewport (from seperator ; to ,)
a1f0dad
Commits on Oct 17, 2011
Felix Gnass fgnass Fix: Support insertion of CharacterData nodes
The original test for arrays yields false positives, since CharacterData elements also have a length property. Hence $('body').append(document.createTextNode('foo')) throws a TypeError.
89c03de
Commits on Oct 20, 2011
Alex Wilson arextar Modify adjacency operators so the content of a script node is evaluat…
…ed only if it has no type attribute or the type attribute is 'text/javascript'
7e3a2f0
Alex Wilson arextar Add tests for preventing the evaluation of non-javascript script elem…
…ents
7a85952
Commits on Oct 25, 2011
Sasha Koss kossnocorp Merge branch 'master' into jasmine
Conflicts:
	src/ajax.js
b5a7371
Sasha Koss kossnocorp Rewrite README in markdown (source now highlighted) 29173b0
Sasha Koss kossnocorp Merge branch 'jasmine' 9776d8b
Josh Faul jocafa Added 'name' variable to line 9 to prevent global variable leak on li…
…ne 198: "for (name in settings.headers)..."
e960ae0
Commits on Oct 26, 2011
Sasha Koss kossnocorp Merge pull request #296 from jocafa/master
The variable "name" is being leaked into the global scope.
9e97371
Sasha Koss kossnocorp Merge pull request #294 from arexkun/master
Fix for #293
60f87bf
Sasha Koss kossnocorp Merge pull request #291 from fgnass/fix_insert_text_nodes
Fix: Support insertion of CharacterData nodes
9c68344
Commits on Oct 27, 2011
Sasha Koss kossnocorp Export Zepto variable to global scope (closes #297) ef686f3
Commits on Oct 30, 2011
Mislav Marohnić mislav add "global" Ajax events as well as an extra "ajaxBeforeSend" event
"Global" events aren't really global because Zepto doesn't support them
yet. Instead they are simply fired on `document`.

Ajax lifecycle is now:
  1. ajaxStart (global) – only fired if there are no active requests
  2. beforeSend callback (cancellable)
  3. ajaxBeforeSend (global, cancellable)
  4. ajaxSend (global)
  5. success/error callback
  6. ajaxSuccess/ajaxError (global)
  7. complete callback
  8. ajaxComplete (global)
  9. ajaxStop (global) – only fired if this is the last active request

Also added:
  - $.active (0) – number of active requests
  - $.ajaxSettings.global (true) – whether global events will fire

If Ajax "context" element is given, "global" events are fired on this
element instead of `document` and they bubble.
c22ca59
Mislav Marohnić mislav fix jasmine YAML config 6cfd096
Mislav Marohnić mislav fix jasmine Ajax spec 71f0130
Commits on Oct 31, 2011
Mislav Marohnić mislav `rake test` runs existing browser tests in headless WebKit b5fe339
Mislav Marohnić mislav make `rake test` also run jasmine specs 376c519
Mislav Marohnić mislav improve form serialization
Changes:
 - ignore disabled elements
 - ignore buttons ("submit", "reset", "button")
90b5ec3
Mislav Marohnić mislav don't force jasmine-headless-webkit on everyone d284ed0
Mislav Marohnić mislav shorter default timeout for tests run in headless webkit 3dcdb20
Mislav Marohnić mislav downgrade some test runner info statements to debug level a9d554d
Mislav Marohnić mislav more solid async Ajax tests
Be careful that callbacks/events for one Ajax request don't occur after
the test case where it originated already finished.
49af32b
Mislav Marohnić mislav don't set X-Requested-With header for cross-domain Ajax
Closes #300
af24a70
Mislav Marohnić mislav fix turning off global Ajax events 0e0245f
Commits on Nov 03, 2011
Mislav Marohnić mislav make first() & last() useful for non-DOM collections
Example:
  $(['a', 'b']).last()  //=> 'b'

Closes #298
9a4be0d
Mislav Marohnić mislav treat status=0 as Ajax error unless over "file:" protocol
Closes #283
75a759d
宇蠢Yuest use window.pageXOffset/pageYOffset instead of body.scrollLeft/scrollTop
iPhone 3 with iOS 4.1 support
eb83019
Thomas Stachl tstachl assets.js remove() override: check if node has a parent 7fe2438
Mislav Marohnić mislav remove unnecessary $(document).ready() in gesture.js
References #303
c255813
Mislav Marohnić mislav $.fx.off is automatically true when no CSS transitions support 6e26ef1
Mislav Marohnić mislav change default transition duration from 0.5s to 0.4s 699ab98
Mislav Marohnić mislav add a compatible $.fn.animate() method
Difference between animate() and anim():
 - animate() receives duration in milliseconds instead of seconds
 - animate() can receive an parameter hash as 2nd argument with keys:
   "duration", "easing", "complete"

anim() is now informally deprecated.
dabc5af
Mislav Marohnić mislav add note about supported browsers in README 08d2ecf
Mislav Marohnić mislav minor README tweaks af5410c
Mislav Marohnić mislav fix package task 6eba304
Mislav Marohnić mislav release v0.8 984dcfe