Commit 0c70d201 by Arthur Barrett

Auto-expand the discussion thread after it is scrolled to by simulating a click…

Auto-expand the discussion thread after it is scrolled to by simulating a click on the show/hide button. Note: the jQuery highlight effect doesnt work here due to a CSS !important setting on .discussion-module background color.
parent 7e7911a0
......@@ -105,8 +105,12 @@ class @Annotatable
onAfter: @makeAfterScroll(el)
})
makeAfterScroll: (el, duration = 500) ->
@_once -> el.effect 'shake', {}, duration
makeAfterScroll: (el, duration = 1500) ->
@_once ->
btn = $('.discussion-show', el)
if !btn.hasClass('shown')
btn.click()
#el.effect 'highlight', {}, duration
makeTipContent: (el) ->
(api) =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment