js,jq點選開啟小彈窗,當前頁面彈出小視窗
阿新 • • 發佈:2018-12-31
function openWin(url) {
var u = url;
window.open(u, 'newwindow', 'height=600, width=800, top=30%,left=30%, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
}
$(function() {
$('.shangqiao').click(function() {
openWin('http://blog.csdn.net/solly793755670');
});
});
//當頁面滾動高度大於100時顯示出盒子
$(function() {
$(window).scroll(function() {
var top = $(window).scrollTop();
if (top > 100) {
$('.myside').fadeIn(800);
} else {
$('.myside').fadeOut(800);
}
});
})