Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
17d85126
authored
2013-09-11 18:16:01 +0700
by
Arseny Zarechnev
Committed by
Michael Richards
2013-09-16 23:26:58 -0700
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
zepto support
1 parent
5471cb20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/rivets.coffee
src/rivets.coffee
View file @
17d8512
...
...
@@ -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
]
=
{}
...
...
Please
register
or
sign in
to post a comment