302b5fff by Michael Richards

Merge branch 'zepto-support'

2 parents 5471cb20 17d85126
......@@ -12,6 +12,9 @@
# The Rivets namespace.
Rivets = {}
# jQuery || Zepto
jQuery = window.jQuery or window.Zepto
# Polyfill For `String::trim`.
unless String::trim then String::trim = -> @replace /^\s+|\s+$/g, ''
......@@ -236,7 +239,7 @@ class Rivets.View
# constructor along with any local options that should be used throughout the
# context of the view and it's bindings.
constructor: (@els, @models, @options = {}) ->
@els = [@els] unless (@els.jquery || @els instanceof Array)
@els = [@els] if typeof @els.length is 'undefined'
for option in ['config', 'binders', 'formatters']
@[option] = {}
......