Permalink
Browse files

Allow args for sticky view

  • Loading branch information...
jawsthegame committed Dec 20, 2012
1 parent fbd393b commit a4e723f07a6c594f0fac62bd766d369b4353cd75
Showing with 6 additions and 3 deletions.
  1. +4 −2 lib/sticky.coffee
  2. +2 −1 views/detail_view.coffee
View
@@ -4,9 +4,11 @@ available = ->
document.documentElement?
module.exports =
- stickify: ($el) ->
+ stickify: ($el, opts) ->
if available()
- $el.stickySidebar(padding: 0, speed: 0)
+ $el.stickySidebar
+ padding: opts?.padding or 0
+ speed: opts?.speed or 0
unstickify: ($el) ->
if available()
View
@@ -26,7 +26,8 @@ class DetailView extends View
@html @template(@item.json())
if @opts?.sticky
- Sticky.stickify(@$el)
+ Sticky.stickify @$el,
+ padding: @opts?.stickyPadding or 0
this

0 comments on commit a4e723f

Please sign in to comment.