0
有一個腳本,顯示一些股利時頁面滾動到低於1400(< 1400),如果超過1400 DIV是隱藏。但我需要該div顯示不是由高度(1400),而是由div id和隱藏「停止」div。請你幫幫我。滾動到div的ID,堆疊後「停止」 DIV ID隱藏(不smoth滾動)
<style>
#goSale {position:fixed;bottom:-300px;width:auto;height:auto;}
#goSale img {opacity:100;-moz-animation:blink normal 3s infinite ease-in-out;-webkit-animation:blink normal 3s infinite ease-in-out;
-ms-animation:blink normal 3s infinite ease-in-out;animation:blink normal 3s infinite ease-in-out;animation-iteration-count:5;-ms-animation-iteration-count:5;
-webkit-animation-iteration-count:5;-o-animation-iteration-count:5;border:0px;width:100px;height:auto;}
</style>
<script>
$(document).ready(function() {
$(window).scroll(function() {
if($(this).scrollTop() < 1400){
$('#goSale').stop().animate({
top: '65px'
}, 1);
}else{
$('#goSale').stop().animate({
top: '-100px'
}, 1); } });
$('#goSale').scroll(function() {
$('html, body').stop().animate({
scrollTop: 0
}, 1, function() {
$('#goSale').stop().animate({
top: '65px'
}, 1); }); }); });
</script>
<div id="goSale"><img src="img/pages/sale.png"></div>
例子:http://www.vichy.ho.ua - 右上角的黑色立方體和其他左側和右側右側「滾動」的元素,如YouTube和其他...
我想你可以用這個製作小提琴。這就是將幫助我們和你們 – plonknimbuzz
https://stackoverflow.com/questions/2928275/jquery-hide-div – JSnewbie
@plonknimbuzz ... www.vichy.ho.ua--右上方的黑色立方體。 –