OSDN Git Service

setting about top
authoryamat0jp <yamat0jp@yahoo.co.jp>
Fri, 23 Dec 2016 00:48:09 +0000 (09:48 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Fri, 23 Dec 2016 00:48:09 +0000 (09:48 +0900)
static/css/main.css
static/js/sub.js

index 9ca4299..c0d8ede 100755 (executable)
@@ -53,7 +53,7 @@ header textarea {
 }\r
 \r
 button {\r
-       position:relative;\r
+       position:absolute;\r
        width:80px;\r
        height:30px\r
 }\r
index e77d553..2520a11 100644 (file)
@@ -22,7 +22,8 @@ $(function(){
                                .animate({top:0},300);
                        $header.addClass('open');
                };
-       });
+       }).css({top:headerOffsetTop+headerHeight});
+       $clonebutton.css({top:headerOffsetTop+headerHeight});
        $headerCloneContainer.append($headerClone);
        $headerCloneContainer.appendTo('body');
        $headerCloneContainer
@@ -44,9 +45,9 @@ $(function(){
                        $window.trigger('scroll');
                };
                if (wintop > headerOffsetTop+headerHeight){
-                       $button.addClass('sticky');
+                       $button.addClass('sticky').css({top:0});
                }else{
-                       $button.removeClass('sticky');
+                       $button.removeClass('sticky').css({top:headerOffsetTop+headerHeight});
                };
        });
 });
\ No newline at end of file