<\/span><\/h2>\n\n\n\n $.fn.smartFloat = function () {\n var position = function (element) {\n console.log(element);\n var top = element.position().top, pos = element.css(\"position\");\n $(window).scroll(function () {\n var scrolls = $(this).scrollTop();\n if ((scrolls - 30) > top) {\n if (window.XMLHttpRequest) {\n element.css({\n position: \"fixed\",\n top: 0,\n width: \"100%\",\n \"background-color\": \"#FFF\",\n \"z-index\": 1\n });\n } else {\n element.css({\n top: scrolls\n });\n }\n } else {\n element.css({\n position: pos,\n top: top\n });\n }\n });\n };\n return $(this).each(function () {\n position($(this));\n });\n };<\/code><\/pre>\n\n\n\n<\/span>\u8c03\u7528\u65b9\u6cd5<\/span><\/h2>\n\n\n\n$(\".post-view-ranking-wrap\").smartFloat();\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u6700\u8fd1\u5728\u5b66seo\uff0c\u53d1\u73b0\u5f88\u591a\u7f51\u7ad9\u4e2d\u90fd\u6709\u8fd9\u79cd\u7684\uff0c\u9875\u9762\u4e0b\u62c9\u65f6\u67d0\u4e2adiv\u4fdd\u6301\u5728\u9875\u9762\u7684\u4f4d\u7f6e\u4e0d\u52a8\u7684\u6548\u679c\uff0c\u5b9e\u73b0\u8d77\u6765\u5176\u5b9e\u5f88\u7b80\u5355\uff0c […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"single-with-sidebar","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[205,47,48],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts\/49720"}],"collection":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/comments?post=49720"}],"version-history":[{"count":1,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts\/49720\/revisions"}],"predecessor-version":[{"id":50695,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts\/49720\/revisions\/50695"}],"wp:attachment":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/media?parent=49720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/categories?post=49720"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/tags?post=49720"}],"curies":[{"name":"wp","href":"http:\/\/api.w.org\/{rel}","templated":true}]}}