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
4d2f8966
authored
2012-07-10 19:06:00 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add support for passing in jQuery objects to the Rivets.View constructor. [Closes #22]
1 parent
db1c574d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
lib/rivets.js
src/rivets.coffee
lib/rivets.js
View file @
4d2f896
...
...
@@ -75,6 +75,9 @@
this
.
bindingRegExp
=
__bind
(
this
.
bindingRegExp
,
this
);
if
(
this
.
el
.
jquery
)
{
this
.
el
=
this
.
el
.
get
(
0
);
}
this
.
build
();
}
...
...
src/rivets.coffee
View file @
4d2f896
...
...
@@ -52,6 +52,7 @@ class Rivets.View
# The parent DOM element and the model objects for binding are passed into the
# constructor.
constructor
:
(
@
el
,
@
models
)
->
@
el
=
@
el
.
get
(
0
)
if
@
el
.
jquery
@
build
()
# Regular expression used to match binding attributes.
...
...
Please
register
or
sign in
to post a comment