Archive for category Jquery, Mootools
8 種 Outlook like AJAX Calendar Components 的介紹和看法
Posted by Chowky in Jquery, Mootools, RIA on September 4, 2009
chowky 覺得類似 outlook , ical 的 AJAX 的calendar好似很散,所以決定整理一下。
1. Day Pilot
這是一個為ASP.NET 而寫的一個component。成熟程度好高。還備有schedule 的 version 。
有Lite (免費,但功能會少一點)和P和Pro (當然要收錢的) version 。


Source: http://www.daypilot.org
2. dhtmlxScheduler
這都是一個很成熟的component. 非常smooth。有齊daily , weekly, monthly,commercial application 其實是必定要完整的。否則一定沒有人買。
不過如果你個想寫的都要是GNU (opensource) 才可以免費使用這個calendar ,否則就要收錢了。(Dual Licensing 亦不能用的呢)
Demo: http://dhtmlx.com/docs/products/dhtmlxScheduler/livedemo.shtml
Source: http://dhtmlx.com/docs/products/dhtmlxScheduler/
小心IE7 javascript 的 getElementById Method 的問題
Posted by Chowky in Articles, Jquery, Mootools, News on August 6, 2009
1. 要注意用相同的 name and id attributes for Form Inputs
chowky 很久以前都覺得奇怪,不過這是因為IE系列和其他不同的browser的分別,ie 是會search 左name attribute先,再search id attribute,但是其他browser是不會的。所以兩個attributes 都要用相同的名。避免發生問題
1 | <input type="text" name="full_address" id="address" value="5th Avenue" /> |
2. 不要放name attribute 在form tag 入面。
和上面的情況非常相似,要避免IE的問題。
不過chowky 不知道name 是deprecated (哈)
Also, the name attribute for forms is deprecated in XHTML Strict, so it’s not best practice anyhow. The name attribute was added to form elements in older sites, so if you’re trying to debug a getElementById issue in IE7 on some inherited code, there could be a conflict occurring due to this fact.
1 2 | <form id="contact_form"> </form> |
Sticky (Fixed) SideNav Layout with CSS
Posted by Chowky in Articles, Jquery, Mootools on August 5, 2009
完成圖

構成的structure

HTML tag
1 2 3 4 | <div class="container"> <div id="sidenav><!--Fixed Sidenav Goes Here--></div> <div id="content"><!--Content Goes Here--></div> </div> |
利用簡單的技巧,
把sidenav 的加上position 和fix的properties.
position: fixed;
float: left;
CSS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | .container { width: 980px; margin: 0 auto; overflow: hidden; background: url(container_stretch.gif); font-size: 1.2em; position: relative; } #sidenav { width: 300px; position: fixed; /*--Fix the sidenav to stay in one spot--*/ float: left; /*--Keeps sidenav into place when Fixed positioning fails--*/ } #content { float: right; /*--Keeps content to the right side--*/ width: 640px; padding: 0 20px 20px; } |
可惜ie6不支援fixed position property
所以要workaround..
1 2 3 4 5 | *html #sidenav { position: absolute; left: expression( ( 0 ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) 'px' ); top: expression( ( 0 ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) 'px' ); } |
[AIR] jQuery Browser
Posted by Chowky in AIR, Jquery, Mootools, RIA on July 28, 2009
又一個新的air application。
jQuery 都採用air來implement這個api browser。
可見,外國的對air的接受性真係比想像中好。

Read the rest of this entry »
[jQuery] 橫向menu subnav with CSS
Posted by Chowky in Jquery, Mootools on July 21, 2009
這個其實不太算是jquery 的,因為jquery 只是幫助解決ie6 支援問題而已。
Menu Navigation 好像已經有很多了,不過chowky 欣賞這作者的simplicity。
大概的structure:
先用 ul ,包住不同的li ,再在li 中加入 [第一層] 和 span 之內的[第二層(subnav)]
<ul id="topnav"> <li><a href="#">Link</a></li> <li> <a href="#">Link</a> <!--Subnav Starts Here--> <span> <a href="#">Subnav Link</a> | <a href="#">Subnav Link</a> | <a href="#">Subnav Link</a> </span> <!--Subnav Ends Here--></li> <li><a href="#">Link</a></li> </ul>
通常的都不是html困難,多數都是css方面的問題。因為要支援很久以前的browser ie6。(ie6 = 煩+嘔血)
以下是對於ul 和li 的styling,應該問題不大。
ul#topnav { margin: 0; padding: 0; float: left; width: 970px; list-style: none; position: relative; /*--Set relative positioning on the unordered list itself - not on the list item--*/ font-size: 1.2em; background: url(topnav_stretch.gif) repeat-x; } ul#topnav li { float: left; margin: 0; padding: 0; border-right: 1px solid #555; /*--Divider for each parent level links--*/ } ul#topnav li a { padding: 10px 15px; display: block; color: #f0f0f0; text-decoration: none; } /*IE6 不支援 li:hover,只支援a:hover*/ ul#topnav li:hover { background: #1376c9 url(topnav_active.gif) repeat-x; } /*--Notice the hover color is on the list item itself, not on the link. This is so it can stay highlighted even when hovering over the subnav--*/
BBC Opensource自家的Javascript Framework: Glow
Posted by Chowky in Jquery, Mootools, News on July 11, 2009
好怪好怪,bbc為什麼要出一套javascript framework,原因不明。哈,其實不是,只是bbc一向是內部用的,沒有公佈出來,
現在opensource 出來。有興趣可以用一下。
License: Apache License 2.0
Source: http://www.bbc.co.uk/glow/
html 5 支援drag and drop
Posted by Chowky in Jquery, Mootools, News on July 3, 2009
下一個web standard,如無意外,應該會是html5+css3。
This example only works in Firefox 3.5 and Safari 4 but here’s a quick tour of how it works.
IE始終都未support。這對於web developer 來說,是一個nightmare,一方面要支援ie,又要支援firefox,safari。
但是,要利用新的html5的function就要放棄ie的support。
chowky對這方面還是樂觀的。later可能會好一點(仍然抱有信念)。
(說完未?)
ok…back to topic
原來要make drag and drop 都不太困難。
會否,因為html5會令html 更普及?
1 2 3 4 5 | <li draggable="true" id="file1" ondragstart="drag(this, event)"><span>filename.txt</span></li> To create a draggable area you can do this. <div id="trash" ondrop="drop(this, event)" ondragenter="return false" ondragover="return false"></div> |
之後再加少少javascript code
1 2 3 4 5 6 7 8 9 | function drag(target, e) { e.dataTransfer.setData('Text', target.id); } function drop(target, e) { var id = e.dataTransfer.getData('Text'); target.appendChild(document.getElementById(id)); e.preventDefault(); } |
Source: http://shapeshed.com/journal/drag_and_drop_in_html5/
[jQuery] Image Flip 為圖片加上倒影和動畫效果
Posted by Chowky in Jquery, Mootools on June 22, 2009
這幾天,真是太忙,是經濟轉好的signal?
希望快點轉好。(chowky 持有很多股票….哈)~
回歸主題。
可以選擇horizontal 和vertical flip,而且reflection 效果都可以turn off.
加入website 之中,立即可以提昇水準。(哈 chowky 一向不相信即時見效的東西)
License: License Free









Recent Comments