use back-to-top initializer, fixes #2840

This commit is contained in:
Florian Staudacher 2012-05-02 00:03:07 +02:00
parent 72124bebc6
commit d31ea8f2bd
3 changed files with 3 additions and 2 deletions

View file

@ -59,6 +59,7 @@
Diaspora.BasePage = function(body) {
$.extend(this, Diaspora.BaseWidget);
$.extend(this, {
backToTop: this.instantiate("BackToTop", body.find("#back-to-top")),
directionDetector: this.instantiate("DirectionDetector"),
events: function() { return Diaspora.page.eventsContainer.data("events"); },
flashMessages: this.instantiate("FlashMessages"),

View file

@ -11,7 +11,7 @@
self.button.click(self.backToTop);
var throttledScroll = _.throttle($.proxy(self.throttledScroll, self), 250);
var throttledScroll = _.throttle($.proxy(self.toggleVisibility, self), 250);
self.window.scroll(throttledScroll);
});

View file

@ -2850,7 +2850,7 @@ a.toggle_selector
:background-color #aaa
&:hover
:opacity 0.85 !important
&:visible
&.visible
:opacity 0.5
.float-right