Thứ Hai, 8 tháng 6, 2015

Document and window event

<script>
$(document).on("mousedown",function(e){
console.log("1 width:" + $(window).width()+" "+$.now());
console.log("1 height:" + $(window).height()+" "+$.now());
console.log("1 D_width:" + $(document).width()+" "+$.now());
console.log("1 D_height:" + $(document).height()+" "+$.now());
})
$(document).on("mouseup",function(e){
console.log("2 width:" + $(window).width()+" "+$.now());
console.log("2 height:" + $(window).height()+" "+$.now());
console.log("2 D_width:" + $(document).width()+" "+$.now());
console.log("2 D_height:" + $(document).height()+" "+$.now());
})
$(window).on("resize",function(e){
console.log("Resize width:" + $(window).width()+" "+$.now());
console.log("Resize height:" + $(window).height()+" "+$.now());
console.log("Resize D_width:" + $(document).width()+" "+$.now());
console.log("Resize D_height:" + $(document).height()+" "+$.now());
})
$(document).on("scroll",function(e){
console.log("Scroll width:" + $(window).width()+" "+$.now());
console.log("Scroll height:" + $(window).height()+" "+$.now());
console.log("Scroll D_width:" + $(document).width()+" "+$.now());
console.log("Scroll D_height:" + $(document).height()+" "+$.now());
})
</script>

Không có nhận xét nào: