diff --git a/src/rivets.coffee b/src/rivets.coffee index ecb0d27d9..4d298fb65 100644 --- a/src/rivets.coffee +++ b/src/rivets.coffee @@ -66,6 +66,7 @@ Rivets = # returns a Rivets.View instance. init: (component, el, data = {}) -> el ?= document.createElement 'div' + el = if !!(window['jQuery'] or window['$']) and el instanceof jQuery then el[0] else el component = Rivets.public.components[component] el.innerHTML = component.template.call @, el scope = component.initialize.call @, el, data