This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-22
Channels
- # alda (1)
- # aws-lambda (23)
- # beginners (27)
- # boot (156)
- # business (2)
- # carry (4)
- # cider (1)
- # cljsjs (2)
- # cljsrn (29)
- # clojure (170)
- # clojure-austin (35)
- # clojure-czech (8)
- # clojure-dusseldorf (5)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-quebec (2)
- # clojure-russia (45)
- # clojure-spec (49)
- # clojure-uk (12)
- # clojurescript (81)
- # component (5)
- # datomic (24)
- # devcards (26)
- # emacs (4)
- # hoplon (4)
- # jobs (1)
- # juxt (5)
- # leiningen (6)
- # luminus (14)
- # mount (26)
- # om (27)
- # om-next (2)
- # onyx (22)
- # pedestal (2)
- # planck (3)
- # proton (5)
- # re-frame (19)
- # reagent (2)
- # ring-swagger (60)
- # spacemacs (12)
- # specter (8)
- # untangled (119)
- # vim (61)
- # yada (36)
just getting my feet wet with hoplon/ui. I have a ui element x that i want to set the scrollTop to scrollHeight (so that it is scrolled to the bottom when the page loads). How do I do this?
(.log js/console x)
(.log js/console (.-scrollHeight (elems/in x)))
(set! (.-scrollTop (elems/in x))
(.-scrollHeight (elems/in x)))
in the above, in the first log output of the element i can look at the js console and see a positive scrollheight, but in the second line when i attempt to print the actual scrollHeight it shows as 0. I'm probably missing something fundamental here?@jjttjj not a ui expert, but maybe you need to set those via (js/jQuery #(...)) aka document ready?
@alandipert yup that fixed it, thanks!