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.
This commit is contained in:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user