Skip to content

Comparing changes

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

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Commits on Aug 03, 2011
@mislav mislav fix filter() and is() for elements without parentNode d24e26a
@mislav mislav fix anim() callback being executed in the context of element
fixes #250
Commits on Aug 05, 2011
@kossnocorp kossnocorp Added failing assertion for issue #209 b19bb98
@kossnocorp kossnocorp Allow to set timeout for ajax request (closes #209) 562d79d
@kossnocorp kossnocorp More assertions for #209 6ef94c0
@kossnocorp kossnocorp Added more info to $.ajax docs ecf9ff0
Commits on Aug 08, 2011
@kossnocorp kossnocorp Added failing assertion to keyframe animation start via $.fn.anim c2b3ea1
@kossnocorp 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
Commits on Aug 09, 2011
@kossnocorp kossnocorp Merge pull request #252 from zoz/master
Trim whitespace from html fragment when using $("<xxx>...</xxx>") to create dom element
Commits on Aug 11, 2011
@kossnocorp kossnocorp Bundle Jasmine gem 14071a2
@kossnocorp kossnocorp Setup rake with bundler 41c24ee
@kossnocorp kossnocorp Bundle rake ebafc9d
@kossnocorp kossnocorp Init Jasmine a50f962
@kossnocorp kossnocorp Write example spec for ajax.js b3f6cfe
@kossnocorp kossnocorp Remove example jasmine's files 197a072
@kossnocorp kossnocorp Install mock-ajax.js 2e61314
@kossnocorp kossnocorp Write adaptation for Zepto in mock-ajax.js 47e7a7f
@kossnocorp kossnocorp Allow to specify xhr transport fd81b81
@kossnocorp kossnocorp Fix typo in mock-ajax helper 0cee6ae
@kossnocorp kossnocorp Make mock-ajax for Zepto finally works 21976ef
@kossnocorp kossnocorp Allow to specify xhr transport 9162a1d
Commits on Aug 12, 2011
@kossnocorp 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")
@kossnocorp kossnocorp Use proper animation end event f683448
@madrobby 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!
@madrobby merge #256 and adapt test condition 28a9087
Commits on Aug 17, 2011
@kossnocorp kossnocorp Failing assertion for #258 c354f88
@kossnocorp kossnocorp Fix issue #258 0362528
@kossnocorp kossnocorp Added failing assertions for pull request #257 d4128b8
@arextar arextar Added special initialization of mouse events 406bd31
@kossnocorp kossnocorp Rename special_events to specialEvents fba76a0
@kossnocorp kossnocorp Fixed assertion for #257 594f22a
@kossnocorp kossnocorp Fix code style of specialEvents defenition e0fd490
Commits on Sep 01, 2011
@mislav mislav fix `return false` cancels event even in delegated handlers 2a7af98
@mislav mislav refactor $.param() so it also accepts data from serializeArray() 9e42ee4
@mislav 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.
Commits on Sep 02, 2011
@mislav mislav refactor attr() to support empty attributes and more input field types
 - 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">`
@mislav mislav val(value) now accepts a function argument 1f90bcb
@romac romac add-on with a new $ method which can store non-scalar values 285471b
@mislav mislav simplify Readme docs for the basic data() method 2cfd0f0
@mislav mislav improve extended data() functionality
 - 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
@mislav mislav fix data() setter; data() getter w/out arguments returns all data 4305a2d
@mislav mislav `rake concat` now accepts arguments to modify which components get in…

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"
Commits on Sep 03, 2011
@arextar arextar Implemented .andSelf cec28ca
@kossnocorp kossnocorp Added failing assertion for #262 6cd3cbf
@kossnocorp kossnocorp Merge branch 'arexkun-master' e85cb7e
@kossnocorp kossnocorp Added $.ajaxSettings specs a51f876
@kossnocorp kossnocorp Added basic $.ajax specs a8cc48f
@kossnocorp kossnocorp Specs for $.ajax callbacks 777126b
@kossnocorp kossnocorp Added specs for $.get aeb6680
@kossnocorp kossnocorp Bundle jasmine-headless-webkit gem bbf0c2f
@kossnocorp kossnocorp jasmine-headless-webkit won't work without setting options in jasmine…
@kossnocorp kossnocorp Clean up jasmine.yml file 4edac6f
@kossnocorp kossnocorp Specs now works in browser and headless-webkit f47e446
@kossnocorp kossnocorp Fix bug in minified version, thanks for @ranbena (closes #164) a6bf149
Commits on Sep 04, 2011
@cmelion 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
@mislav mislav refactor Ajax sending with regard to timeout f1ef348
@mislav 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
@ranbena ranbena add abort() functionality for $.ajaxJSONP db82675
@mislav mislav ensure $.get(), $.post(), $.getJSON() all return xhr objects e7bc9fe
@mislav mislav test ajax timeout behavior 6b7f9ad
@mislav mislav refactor JSONP fetching; ensure that <script> elements are cleaned up 0b183b2
@mislav mislav support "timeout" setting for JSONP b53c104
Commits on Sep 05, 2011
@mislav mislav fix functionality of slightly outdated examples 87bd885
@LinusU 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.
Commits on Sep 08, 2011
@fauxparse fauxparse fix 2nd argument to toggleClass(name, bool)
The boolean parameter indicates whether the class should be added or removed.
@mislav 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
Commits on Sep 10, 2011
@mislav 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().
@mislav 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.
@mislav mislav event methods now support event names & handlers passed as an object
    click: function(e) { ... },
    keypress: function(e) { ... }

Closes #199
Commits on Sep 11, 2011
@mislav mislav retouch test suites, display the test run outcome on the page
Also looks decent on mobile
@mislav mislav fix accidental globals d961e2c
Commits on Sep 13, 2011
@mislav mislav fix $.Event(type, {bubbles:false}) cross-browser
Opera doesn't allow event.bubbles to be set directly as a property.
@mislav 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.
@mislav mislav tweak detect.js implementation and improve tests d76c4ae
@aglemann aglemann add $.fn.insertBefore() & insertAfter()
insertBefore and insertAfter are inverse operators of before() and
@aglemann aglemann slim down replaceWith() 4b85e47
Commits on Sep 19, 2011
@mislav mislav improve $.fn.width() & height() to work on window & document objects 1edbad5
@mislav mislav enable $.fn.anim() in Firefox, Opera, and IE 069569b
Commits on Sep 20, 2011
@mislav 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
@mislav mislav fadeOut() sets "display:none" on element upon completion 23907bb
@mislav mislav fix `return false` in delegate event handlers
This was a regression in 9610403
@mislav mislav improve $(document).ready(), pass Zepto as 1st argument to handlers
Now it also fires immediately during "interactive" state.

Closes #159, closes #278
Commits on Oct 09, 2011
@kertal 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.
@mislav mislav add tests for before() & after() behavior on fragments 96681a7
@mislav mislav unified event handling with fn.on() & off()
  $('el').on(event, handler)
  $(document).on(event, selector, handler)

Matches jQuery 1.7 API.

Closes #286
Commits on Oct 15, 2011
@Messiahs Messiahs Change viewport (from seperator ; to ,) 640b321
@madrobby Merge pull request #290 from Messiahs/patch-1
Change viewport (from seperator ; to ,)
Commits on Oct 17, 2011
@fgnass 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.
Commits on Oct 20, 2011
@arextar 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'
@arextar arextar Add tests for preventing the evaluation of non-javascript script elem…
Commits on Oct 25, 2011
@kossnocorp kossnocorp Merge branch 'master' into jasmine
@kossnocorp kossnocorp Rewrite README in markdown (source now highlighted) 29173b0
@kossnocorp kossnocorp Merge branch 'jasmine' 9776d8b
@jocafa jocafa Added 'name' variable to line 9 to prevent global variable leak on li…
…ne 198: "for (name in settings.headers)..."
Commits on Oct 26, 2011
@kossnocorp kossnocorp Merge pull request #296 from jocafa/master
The variable "name" is being leaked into the global scope.
@kossnocorp kossnocorp Merge pull request #294 from arexkun/master
Fix for #293
@kossnocorp kossnocorp Merge pull request #291 from fgnass/fix_insert_text_nodes
Fix: Support insertion of CharacterData nodes
Commits on Oct 27, 2011
@kossnocorp kossnocorp Export Zepto variable to global scope (closes #297) ef686f3
Commits on Oct 30, 2011
@mislav 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
  - $ (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.
@mislav mislav fix jasmine YAML config 6cfd096
@mislav mislav fix jasmine Ajax spec 71f0130
Commits on Oct 31, 2011
@mislav mislav `rake test` runs existing browser tests in headless WebKit b5fe339
@mislav mislav make `rake test` also run jasmine specs 376c519
@mislav mislav improve form serialization
 - ignore disabled elements
 - ignore buttons ("submit", "reset", "button")
@mislav mislav don't force jasmine-headless-webkit on everyone d284ed0
@mislav mislav shorter default timeout for tests run in headless webkit 3dcdb20
@mislav mislav downgrade some test runner info statements to debug level a9d554d
@mislav 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.
@mislav mislav don't set X-Requested-With header for cross-domain Ajax
Closes #300
@mislav mislav fix turning off global Ajax events 0e0245f
Commits on Nov 03, 2011
@mislav mislav make first() & last() useful for non-DOM collections
  $(['a', 'b']).last()  //=> 'b'

Closes #298
@mislav mislav treat status=0 as Ajax error unless over "file:" protocol
Closes #283
宇蠢Yuest use window.pageXOffset/pageYOffset instead of body.scrollLeft/scrollTop
iPhone 3 with iOS 4.1 support
@tstachl tstachl assets.js remove() override: check if node has a parent 7fe2438
@mislav mislav remove unnecessary $(document).ready() in gesture.js
References #303
@mislav mislav $ is automatically true when no CSS transitions support 6e26ef1
@mislav mislav change default transition duration from 0.5s to 0.4s 699ab98
@mislav 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.
@mislav mislav add note about supported browsers in README 08d2ecf
@mislav mislav minor README tweaks af5410c
@mislav mislav fix package task 6eba304
@mislav mislav release v0.8 984dcfe