app/assets/javascripts/ultimate/jquery-plugin-class.js.coffee in ultimate-base-0.3.1 vs app/assets/javascripts/ultimate/jquery-plugin-class.js.coffee in ultimate-base-0.3.1.1

- old
+ new

@@ -12,11 +12,22 @@ locale: "en" translations: {} constructor: (options) -> @$el = $(options.el) - @delegateEvents() @findNodes() + @initialize arguments... + @delegateEvents() + + + # jQuery delegate for element lookup, scoped to DOM elements within the + # current plugin. This should be prefered to global lookups where possible. + $: (selector) -> + @$el.find(selector) + + # Initialize is an empty function by default. Override it with your own + # initialization logic. + initialize: -> findNodes: (jRoot = @$el, nodes = @nodes) -> jNodes = {} nodes = nodes() if _.isFunction(nodes) if _.isObject(nodes)