app/assets/javascripts/mercury/statusbar.js.coffee in mercury-rails-0.1.1 vs app/assets/javascripts/mercury/statusbar.js.coffee in mercury-rails-0.1.2

- old
+ new

@@ -4,19 +4,23 @@ @build() @bindEvents() build: -> - @element = $('<div>', {class: 'mercury-statusbar'}).appendTo($(@options.appendTo).get(0) ? 'body') + @element = jQuery('<div>', {class: 'mercury-statusbar'}).appendTo(jQuery(@options.appendTo).get(0) ? 'body') bindEvents: -> Mercury.bind 'region:update', (event, options) => - @setPath(options.region.path()) if options.region && $.type(options.region.path) == 'function' + @setPath(options.region.path()) if options.region && jQuery.type(options.region.path) == 'function' height: -> - @element.outerHeight() + return @element.outerHeight() + + + top: -> + return @element.offset().top setPath: (elements) -> path = [] path.push("<a>#{element.tagName.toLowerCase()}</a>") for element in elements