Add support for passing in jQuery objects to the Rivets.View constructor. [Closes #22]
Showing
2 changed files
with
4 additions
and
0 deletions
... | @@ -52,6 +52,7 @@ class Rivets.View | ... | @@ -52,6 +52,7 @@ class Rivets.View |
52 | # The parent DOM element and the model objects for binding are passed into the | 52 | # The parent DOM element and the model objects for binding are passed into the |
53 | # constructor. | 53 | # constructor. |
54 | constructor: (@el, @models) -> | 54 | constructor: (@el, @models) -> |
55 | @el = @el.get(0) if @el.jquery | ||
55 | @build() | 56 | @build() |
56 | 57 | ||
57 | # Regular expression used to match binding attributes. | 58 | # Regular expression used to match binding attributes. | ... | ... |
-
Please register or sign in to post a comment