2014年3月28日 星期五

jQuery go to Top Bottom PageUp PageDown

又來念一下做post機上用網頁系統真麻煩
但還是要克服,用法很簡單
top
$('#top').click(function () {
     $('body,html').animate({ scrollTop: 0 }, 300);
});
bottom
$('#bottom').click(function () {
     $('body,html').animate({ scrollTop: $(document).height() }, 300);
});
PageDown
$('#PageDown').click(function () {
     $('body,html').animate({ scrollTop:  $(window).scrollTop() + 300 }, 300);
});
PageUp
$('#PageUp').click(function () {
     $('body,html').animate({ scrollTop:  $(window).scrollTop() - 300 }, 300);
});

2014年3月27日 星期四

FancyBox 解決gallery模式時next prev檔到scroll bar

點我進入
這個解法官方就有摟
註記一下讓自己不會忘記修改css
.fancybox-nav {
 position: absolute;
 top: 0; 
 /*width: 40%;Marco*/
 width: 60px;
 height: 100%;
 cursor: pointer;
 text-decoration: none;
 background: transparent url('blank.gif'); /* helps IE */
 -webkit-tap-highlight-color: rgba(0,0,0,0);
 z-index: 8040;
}

.fancybox-prev {
 /* left: 0;Marco */
 left: -60px;
}

.fancybox-next {
   /* right: 0; Marco */
  right: -60px;
}

Google Chrome Scroll Bar 變成windows 7 Scroll Bar

最近也在post機上的網頁
但是post機相當舊了裝IE8是可以跑但超慢
於是就找了Chrome來裝但Post機上用網頁操作是有點不方便
尤其是chrome scroll bar相當窄
我以有時會點不到還好找到將Chrome scroll bar變成win 7的外掛程式
使用相當簡單
1.點我
2.點 + ADD or + 免費
3.關掉Chrome再開就好
參考網站

2014年3月13日 星期四

jQueryUI Virtual Keyboard

最近有遇到在post機上使用網頁的案子
因為post上只有簡單的鍵盤所以只能像ktv一樣輸入簡單的字
但網頁的話就不像ap那麼簡單
還好找到了一個不錯的jQuery UI Virtual Keyboard
這樣可以防者User輸入些不必要的字元
但中文的化可能就...
使用相當簡單
加入
1.jquery參考
2.加入jquery ui參考
3.加入Virtual Keyboard官方參考