Expect $(domElement1, domElement2) to return [domElement1] like jQuery. #426

Merged
merged 1 commit into from Apr 4, 2012

Conversation

Projects
None yet
3 participants
@johnboxall
Contributor

johnboxall commented Mar 7, 2012

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.

@ghost ghost assigned mislav Mar 17, 2012

madrobby added a commit that referenced this pull request Apr 4, 2012

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

@madrobby madrobby merged commit 62a192c into madrobby:master Apr 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment