tips懸停
http://www.php100.com/html/program/jquery/2013/0905/5970.htmlhttp://vadikom.com/demos/poshytip/
http://www.cnblogs.com/best/archive/2011/09/27/2193572.html
JQuery插件TipsWindown 1.1
一個基于jQuery的彈出層。支持拖拽,支持內容為文字,圖片,URL等!至于兼容性。在IE6下,彈出對像無法絕對固定。其他應該沒啥大問題;
最新更新:(2010-08-12):修正IE6下不能遮住下拉菜單的BUG,增加拖動時半透明效果。
應用演示
- 彈出文本信息提示:
tipsWindown("提示","text:提示信息內容","250","150","true","","true","msg")
- 彈出頁面中的某個ID的html:
tipsWindown("標題","id:testID","300","200","true","","true","id")
- 彈出圖片:
tipsWindown("圖片","img:圖片路徑","250","150","true","","true","img")
- get加載一個.html文件(也可以是.php/.asp?id=4之類的):
tipsWindown("標題","url:get?test.html","250","150","true","","true","text");
- 加載一個頁面到框架顯示:
tipsWindown("標題","iframe:http://www.nowamagic.net","900","580","true","","true","leotheme");
- 彈出一個不能拖動且沒有遮罩背景的文本信息層:
tipsWindown("提示","text:提示信息內容","250","150","false","","false","msg")
- 彈出一個不能拖動,三秒鐘自動關閉的層:
tipsWindown("提示","text:提示信息內容","250","150","false","3000","true","msg")
參數說明
順序 | 參數 | 功能 | 備注 | |
---|---|---|---|---|
1 | title | 彈出層的標題 | 必填,純文本 | |
2 | content | 彈出層的內容 | text | 文本內容 |
id | 頁面里某id的子標簽 | |||
img | 圖片 | |||
url | get或post某一頁面里的html,該頁面要求只包含body的子標簽 | |||
iframe | 目標地址在框架顯示 | |||
3 | width | 彈出層的寬 | 必填,比如“200”。(不需要帶px) | |
4 | height | 彈出層的高 | 同 width | |
5 | drag | 是否可拖動 | 必填,可選參數(true,false) | |
6 | time | 自動消失時間 | 可不填,默認不自動關閉;參數可為空("") | |
7 | showbg | 是否顯示遮罩層 | 可不填,默認不顯示(此項如填了,它前面的time也必須要填) | |
8 | cssName | 彈出層附加樣式名 | 可不填 |
像這種彈出透明背景層效果很常見了,除部分區域可以操作外其他區域不能操作,目前有提供插件,完全可以實現此種效果。
查看本頁源代碼可獲取所有所需的代碼。