原创 jQuery queue & dequeue

  These methods tend to come in pairs when you’re working within the animation queue. When you use the animate and show

原创 How to get selected text

<mce:script language=javascript><!-- function getSelText() { var txt = ''; if (window.getSelection){ t

原创 meta http-equiv="X-UA-Compatible" content="IE=7" 的意思

  X-UA-Compatible是針對ie8新加的一個設置,對於ie8之外的瀏覽器是不識別的,這個區別與content="IE=7"在無論頁面是否包含<!DOCTYPE>指令,都像是使用了 Windows Internet Explor

原创 IE6 bug總結

隨着IE8的問世,微軟終於開始將其瀏覽器向標準化靠攏,而且其市場佔有率已經接近於Chrome了,但由於IE6及IE7仍然佔有巨大的市場份額,在此我總結一下主要關於IE6/7的bug。 1. 雙倍浮向Bug 這 個bug在IE6及更低版本的

原创 Mouse position

  At the moment I am writing an Introduction to Events. As part of my study I wanted to create a generic, simple script

原创 Event properties

What is the type of the event? This is the only question with a true cross-browser answer: use the typeproperty to read

原创 Convert selected text to link (works in FF and IE)

<html> <head> <title>Text to Hyperlink</title> </head> <body> <h1>Create a link</h1> Select some text and click the

原创 inline-block問題

display:inline-block對排版佈局很有用,可以使內聯元素擁有塊狀元素的屬性,但仍舊維持內聯元素的本身,IE及FireFox3都支持該屬性,可惜的是FireFox2卻不支持inline-block的屬性。 如何讓FireFo

原创 jQuery queue &amp;amp; dequeue

  These methods tend to come in pairs when you’re working within the animation queue. When you use the animate and show

原创 IE7 sticky hover bug

該bug只存在於IE7中。 當我們在做導航菜單時,會用到CSS來控制下拉菜單的隱藏和顯示,看下面的例子。 <ul> <li>菜單一</li> <ul> <li>子菜單一</li> <li>

原创 HTML 5 會爲 Flash 和 Silverlight 送終嗎?

  W3C 在 HTML 5 proposal  中爲 HTML 5 賦予了這樣的使命,它將彌補上一代 HTML  的不足,具體說,是實現 Flash, Silverlight, JavaFX 所能實現的功能。 HTML 5,這個 HTM

原创 How To Solve Flickering Background Images

  If you're using CSS sprites as background images for links or buttons, you'll notice that the image will flicker brie