Skip to content

Instantly share code, notes, and snippets.

@Joseph7451797
Last active August 29, 2015 14:05
Show Gist options
  • Save Joseph7451797/1156b1d5827fbd1de81c to your computer and use it in GitHub Desktop.
Save Joseph7451797/1156b1d5827fbd1de81c to your computer and use it in GitHub Desktop.
<script type='text/javascript'> // 網頁底端浮動視窗的js語法
$(function(){
$(window).scroll(function() {
if($(document).scrollTop() + $(window).height() >= $(document.body).height()) {
$("#popup").fadeIn('slow')
}
else if( $(document).scrollTop() < 400) {
$("#popup").fadeOut('slow')
}
});
$(".cross").click(function(){
$("#popup").fadeOut('fast')
})
$(".closebutton").click(function(){
$("#popup").fadeOut('fast')
})
$(".goquestion").click(function(){
$("#popup").fadeOut('fast')
})
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment