Back

Limitations

Browser Support

Chrome Safari Firefox Edge   IE   Opera
Desktop Yes Yes Yes Yes 9+ Yes
iOS Yes Yes
Android Yes

Unsupported Selectors

The following selectors are currently unsupported.

$('h2[foo!="bar"]')

Iterators

DollarJS universally uses a different style of iterator than jQuery. The order of the parameters is different. This is an intentional choice because we believe this approach to be more adherent to JavaScript's accepted practices.

An iterator in DollarJS

$('p').each(function (value, key, collection) {
    console.log(value);
});

An iterator in jQuery

$('p').each(function (key, value, collection) {
    console.log(value);
});

Bindings

DollarJS does event bindings using addEventListener. Therefore, returning false from an event handler does not prevent the default behavior or stop the event from bubbling. This is expected of addEventListener.

The following does NOT work

$('a').on('click', function (e) {
    return false;
});

You should do this instead

$('a').on('click', function (e) {
    e.preventDefault();
    e.stopPropagation();
});