Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jquery-animate.cljs
;; JS:
;; $('html,body').animate({ scrollTop: element.offset().top }, 'slow');
(def $ js/jQuery)
(let [js-anim-dest (js-obj "scrollTop" (aget (.offset element) "top"))])
(.animate ($ "html,body") js-anim-dest "slow")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment