??xml version="1.0" encoding="utf-8" standalone="yes"?>青檬在线电视剧在线观看,国产视频亚洲,国产精品久久久久一区二区国产http://www.aygfsteel.com/xiaohuzi2008/category/53028.html面朝大vQ春暖花开zh-cnFri, 29 Mar 2013 22:40:40 GMTFri, 29 Mar 2013 22:40:40 GMT60【{】分?0个有用的免费的jQuery工具提示插ghttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/20/396767.html胡?/dc:creator>胡?/author>Wed, 20 Mar 2013 14:00:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/20/396767.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/396767.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/20/396767.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/396767.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/396767.html

当你鼠标悬停在该元?/span>Q可以显C元素有关的信息?/span>当你xC的额外信息Q?span>工具提示是最好的Q?/span>无需改变你的设计元素?/span>当你把鼠标光标移到元素,比如链接或按钮,出现一个小框,额外的显C有兌元素的信息。工hC可以更加用户友好的

大多数的|站理员用这些工hC显CZ们的Facebook和Twitter的追随者,同样圎ͼ你可以利用这些工hCq|站信息?/span>

今天Q我已经攉?0个最好的Q免费供您用jQuery的工hC插件?/span>

jQuery Tooltip Plugins

qTip2

qTip2

More about qTip2

Tooltipster

Tooltipster

More about Tooltipster

Tooltipsy

Tooltipsy

More about Tooltipsy

clueTip

clueTip

More about clueTip

PowerTip

PowerTip

More about PowerTip

wTooltip

wTooltip

More about wTooltip

Tipped

Tipped

More about Tipped

Responsive and Mobile-Friendly Tooltip

Responsive and Mobile-Friendly Tooltip

More about Responsive and Mobile-Friendly Tooltip

tinytooltip

tinytooltip

More about tinytooltip

Tipsy

Tipsy

More about Tipsy

Sticky Tooltip

Sticky Tooltip

More about Sticky Tooltip

jQuery Tools Tooltip

jQuery Tools Tooltip

More about jQuery Tools Tooltip

EZPZ Tooltip

EZPZ Tooltip

More about EZPZ Tooltip

Gips

Gips

More about Gips

JQuery Tooltip Plugin

JQuery Tooltip Plugin

More about JQuery Tooltip Plugin

BsTip

BsTip

More about BsTip

ChillTip

ChillTip

More about ChillTip

TipTip

TipTip

More about TipTip

Colortip

Colortip

More about Colortip

jQuery and CSS3 Simple Tooltip

jQuery and CSS3 Simple Tooltip

More about jQuery and CSS3 Simple Tooltip

转:
http://www.cnblogs.com/58top/archive/2013/01/11/free-jquery-tooltip-plugins.html


]]>
【{】用JavaScript建立一个语法高亮输入框http://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/20/396763.html胡?/dc:creator>胡?/author>Wed, 20 Mar 2013 13:35:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/20/396763.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/396763.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/20/396763.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/396763.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/396763.htmltextarea元素已被q泛用于|页Web的IDE。通常|站自带的textarea~辑器不能满x们的需求,作ؓ一名开发者我们经帔R要进行代码的在线~辑Q高亮显CZ码等Q因此,通过其他的开源项目,我们可以d一些实用的功能Q?在这文章中Q我?a >JavaScript?a >ACE来创Z个输入框效果。这是一个完全开源的脚本。该脚本允许开发h员创建支持语法高亮的输入框。然后你可以代码嵌入到网站中的Q何地?br />
下蝲?首先我们需要Github上下载ACE代码?下蝲完成后解压羃Q在你的header部分引入js文g
 <script src="src-min/ace.js" type="text/javascript" charset="utf-8"></script>

d代码到编辑器

首先讄一个id?code>editor的div 然后在script里面调用ace.edit()ҎQ代码如?/code>

var editor = ace.edit("editor");
  editor.getSession().setMode(
"ace/mode/javascript");

您可以重命名变量Qؓ了方便v见,我定义了var editor作ؓ变量Q你也可以定义var demoeditor作ؓ变量。第二行声明使用哪种cd的语a高亮昄。您可以?src 目录选择其他语言集合。这里是一些支持支持的语言集合Q?/span>

  • SQL
  • Ruby
  • SASS
  • PHP
  • Objectivec
  • Csharp
  • Java
  • JSON

 使用额外的参?/span>


editor.setTheme("ace/theme/dawn");
  editor.getSession().setTabSize(
2);
  editor.getSession().setUseWrapMode(
true);

q?行代码是关于文本输入效果的,W一行改变代码默认的语法颜色和主题,?span>src目录下个有几十个新的主题Q你可以从中L选择

另外两个选项是关于用户体验。通常情况下,按一个键盘上的Tab键将输入4个空|q里我设|成2个空|此外Q该文本在默认情况下不会自动换行,了会追加一个水qx动条向外延。但使用q种ҎsetUseWrapModeQtrueQ?/span>Q我们可以修复自动换行的问题?/span>

q有一些其他的命oQ你可以参?/span>ACE向导。这里面包含了改变光标的位置Q动态添加新内容Q或复制的文本的全部内容?/span>


CSS代码

 


#editor {    
margin
-left: 15px;
margin
-top: 15px;
width: 1000px;
height: 400px; }
原文Q?div>http://www.cnblogs.com/58top/archive/2013/01/28/building-a-syntax-highlighted-input-box-with-javascript.html







]]>
【{】jquery sortable..W记http://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/01/395906.html胡?/dc:creator>胡?/author>Fri, 01 Mar 2013 04:44:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/01/395906.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/395906.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/01/395906.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/395906.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/395906.html
所有的事g回调函数都有两个参数Q?span style="color: #ff0000;">event?span style="color: #ff0000;">uiQ浏览器自有event对象Q和l过装的ui对象  
ui.helper - 表示sortable元素的JQuery对象Q通常是当前元素的克隆对象  
ui.position - 表示相对当前对象Q鼠标的坐标值对象{top,left}  
ui.offset - 表示相对于当前页面,鼠标的坐标值对象{top,left}  
ui.item - 表示当前拖拽的元?nbsp; 
ui.placeholder - 占位W(如果有定义的话)  
ui.sender - 当前拖拽元素的所属sortable对象Q仅当元素是从另一个sortable对象传递过来时有用Q?nbsp; 

·参数Q参数名 : 参数cd : 默认|  
appendTo : String : 'parent'
Defines where the helper that moves with the mouse is being appended to during the drag (for example, to resolve overlap/zIndex issues).  
初始Q?('.selector').sortable({ appendTo: 'body' });  
获取Qvar appendTo = $('.selector').sortable('option', 'appendTo');  
讄Q?('.selector').sortable('option', 'appendTo', 'body');  

axis : String : false   
如果有设|,则元素仅能横向或U向拖动。可选|'x', 'y'
初始Q?('.selector').sortable({ axis: 'x' });  
获取Qvar axis = $('.selector').sortable('option', 'axis');  
讄Q?('.selector').sortable('option', 'axis', 'x');  

cancel : Selector : ':input,button'   
L排序动作在匹配的元素上发生?nbsp; 
初始Q?('.selector').sortable({ cancel: 'button' });  
获取Qvar cancel = $('.selector').sortable('option', 'cancel');  
讄Q?('.selector').sortable('option', 'cancel', 'button');  

connectWith : Selector : false   
允许sortable对象q接另一个sortable对象Q可item元素拖拽到另一个中?nbsp; 
初始Q?('.selector').sortable({ connectWith: '.otherlist' });  
获取Qvar connectWith = $('.selector').sortable('option', 'connectWith');  
讄Q?('.selector').sortable('option', 'connectWith', '.otherlist');  

containment : Element, String, Selector : false   
U束排序动作只能在一个指定的范围内发生。可选|DOM对象, 'parent', 'document', 'window', 或jQuery对象  
初始Q?('.selector').sortable({ containment: 'parent' });  
获取Qvar containment = $('.selector').sortable('option', 'containment');  
讄Q?('.selector').sortable('option', 'containment', 'parent');  

cursor : String : 'auto'
定义在开始排序动作时Q如果的样式?nbsp; 
初始Q?('.selector').sortable({ cursor: 'crosshair' });  
获取Qvar cursor = $('.selector').sortable('option', 'cursor');  
讄Q?('.selector').sortable('option', 'cursor', 'crosshair');  

cursorAt : Object : false   
当开始移动时Q鼠标定位在的某个位|上Q最多两个方向)。可选|{ top, left, right, bottom }.  
初始Q?('.selector').sortable({ cursorAt: 'top' });  
获取Qvar cursorAt = $('.selector').sortable('option', 'cursorAt');  
讄Q?('.selector').sortable('option', 'cursorAt', 'top');  

delay : Integer : 0  
以毫Uؓ单位Q设|gq多久才ȀzL序动作。此参数可防止误点击?nbsp; 
初始Q?('.selector').sortable({ delay: 500 });  
获取Qvar delay = $('.selector').sortable('option', 'delay');  
讄Q?('.selector').sortable('option', 'delay', 500);  

distance : Integer : 1  
军_臛_要在元素上面拖动多少像素后,才正式触发排序动作?nbsp; 
初始Q?('.selector').sortable({ distance: 30 });  
获取Qvar distance = $('.selector').sortable('option', 'distance');  
讄Q?('.selector').sortable('option', 'distance', 30);  

dropOnEmpty : Boolean : true   
是否允許拖拽C個空的sortable对象中?nbsp; 
初始Q?('.selector').sortable({ dropOnEmpty: false });  
获取Qvar dropOnEmpty = $('.selector').sortable('option', 'dropOnEmpty');  
讄Q?('.selector').sortable('option', 'dropOnEmpty', false);  

forceHelperSize : Boolean : false   
If true, forces the helper to have a size.  
初始Q?('.selector').sortable({ forceHelperSize: true });  
获取Qvar forceHelperSize = $('.selector').sortable('option', 'forceHelperSize');  
讄Q?('.selector').sortable('option', 'forceHelperSize', true);  

forcePlaceholderSize : Boolean : false
If true, forces the placeholder to have a size.  
初始Q?('.selector').sortable({ forcePlaceholderSize: true });  
获取Qvar forcePlaceholderSize = $('.selector').sortable('option', 'forcePlaceholderSize');  
讄Q?('.selector').sortable('option', 'forcePlaceholderSize', true);  

grid : Array : false   
排序对象的item元素视ؓ一个格子处理,每次Ud都按一个格子大移动,数组|[x,y]  
初始Q?('.selector').sortable({ grid: [50, 20] });  
获取Qvar grid = $('.selector').sortable('option', 'grid');  
讄Q?('.selector').sortable('option', 'grid', [50, 20]);  

handle : Selector, Element : false   
限制排序的动作只能在item元素中的某个元素开始?nbsp; 
初始Q?('.selector').sortable({ handle: 'h2' });  
获取Qvar handle = $('.selector').sortable('option', 'handle');  
讄Q?('.selector').sortable('option', 'handle', 'h2');  

helper : String, Function : 'original'   
讄是否在拖拽元素时Q显CZ个辅助的元素。可选|'original', 'clone'
初始Q?('.selector').sortable({ helper: 'clone' });  
获取Qvar helper = $('.selector').sortable('option', 'helper');  
讄Q?('.selector').sortable('option', 'helper', 'clone');  

items : Selector : '> *'   
指定在排序对象中Q哪些元素是可以q行拖拽排序的?nbsp; 
初始Q?('.selector').sortable({ items: 'li' });  
获取Qvar items = $('.selector').sortable('option', 'items');  
讄Q?('.selector').sortable('option', 'items', 'li');  

opacity : Float : false   
定义当排序时Q辅助元?helper)昄的透明度?nbsp; 
初始Q?('.selector').sortable({ opacity: 0.6 });  
获取Qvar opacity = $('.selector').sortable('option', 'opacity');  
讄Q?('.selector').sortable('option', 'opacity', 0.6);  

placeholderType: StringDefault: false   
讄当排序动作发生时Q空白占位符的CSS样式?nbsp; 
初始Q?('.selector').sortable({ placeholder: 'ui-state-highlight' });  
获取Qvar placeholder = $('.selector').sortable('option', 'placeholder');  
讄Q?('.selector').sortable('option', 'placeholder', 'ui-state-highlight');  

revert : Boolean : false
如果讄成trueQ则被拖拽的元素在返回新位置Ӟ会有一个动L果?nbsp; 
初始Q?('.selector').sortable({ revert: true });  
获取Qvar revert = $('.selector').sortable('option', 'revert');  
讄Q?('.selector').sortable('option', 'revert', true);  

scroll : Boolean : true
如果讄成trueQ则元素被拖动到面边缘Ӟ会自动滚动?nbsp; 
初始Q?('.selector').sortable({ scroll: false });  
获取Qvar scroll = $('.selector').sortable('option', 'scroll');  
讄Q?('.selector').sortable('option', 'scroll', false);  

scrollSensitivity : Integer : 20   
讄当元素移动至边缘多少像素Ӟ便开始滚动页面?nbsp; 
初始Q?('.selector').sortable({ scrollSensitivity: 40 });  
获取Qvar scrollSensitivity = $('.selector').sortable('option', 'scrollSensitivity');  
讄Q?('.selector').sortable('option', 'scrollSensitivity', 40);  

scrollSpeed : Integer : 20  
讄面滚动的速度?nbsp; 
初始Q?('.selector').sortable({ scrollSpeed: 40 });  
获取Qvar scrollSpeed = $('.selector').sortable('option', 'scrollSpeed');  
讄Q?('.selector').sortable('option', 'scrollSpeed', 40);  

tolerance : String : 'intersect'
讄当拖动元素越q其它元素多时便对元素q行重新排序。可选|'intersect', 'pointer'
intersectQ至重?0%  
pointerQ鼠标指针重叠元?nbsp; 
初始Q?('.selector').sortable({ tolerance: 'pointer' });  
获取Qvar tolerance = $('.selector').sortable('option', 'tolerance');  
讄Q?('.selector').sortable('option', 'tolerance', 'pointer');  

zIndex : Integer : 1000  
讄在排序动作发生时Q元素的z-index倹{?nbsp; 
初始Q?('.selector').sortable({ zIndex: 5 });  
获取Qvar zIndex = $('.selector').sortable('option', 'zIndex');  
讄Q?('.selector').sortable('option', 'zIndex', 5);  


·事g  

start  
当排序动作开始时触发此事件?nbsp; 
定义Q?('.selector').sortable({ start: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortstart', function(event, ui) { ... });  

sort  
当元素发生排序时触发此事件?nbsp; 
定义Q?('.selector').sortable({ sort: function(event, ui) { ... } });  
l定Q?('.selector').bind('sort', function(event, ui) { ... });  

change  
当元素发生排序且坐标已发生改变时触发此事件?nbsp; 
定义Q?('.selector').sortable({ change: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortchange', function(event, ui) { ... });  

beforeStop  
当排序动作结束之前触发此事g。此时占位符元素和辅助元素仍有效?nbsp; 
定义Q?('.selector').sortable({ beforeStop: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortbeforeStop', function(event, ui) { ... });  

stop  
当排序动作结束时触发此事件?nbsp; 
定义Q?('.selector').sortable({ stop: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortstop', function(event, ui) { ... });  

update  
当排序动作结束时且元素坐标已l发生改变时触发此事件?nbsp; 
定义Q?('.selector').sortable({ update: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortupdate', function(event, ui) { ... });  

receive  
当一个已q接的sortable对象接收到另一个sortable对象的元素后触发此事件?nbsp; 
定义Q?('.selector').sortable({ receive: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortreceive', function(event, ui) { ... });  

over  
当一个元素拖拽移入另一个sortable对象后触发此事g?nbsp; 
定义Q?('.selector').sortable({ over: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortover', function(event, ui) { ... });  

out  
当一个元素拖拽移出sortable对象Udq进入另一个sortable对象后触发此事g?nbsp; 
定义Q?('.selector').sortable({ out: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortout', function(event, ui) { ... });  

activate  
当一个有使用q接的sortable对象开始排序动作时Q所有允许的sortable触发此事件?nbsp; 
定义Q?('.selector').sortable({ activate: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortactivate', function(event, ui) { ... });  

deactivate  
当一个有使用q接的sortable对象l束排序动作Ӟ所有允许的sortable触发此事件?nbsp; 
定义Q?('.selector').sortable({ deactivate: function(event, ui) { ... } });  
l定Q?('.selector').bind('sortdeactivate', function(event, ui) { ... });  


·Ҏ  
destory  
从元素中U除拖拽功能?nbsp; 
用法Q?sortable( 'destroy' )  

disable  
用元素的拖拽功能?nbsp; 
用法Q?sortable( 'disable' )  

enable  
启用元素的拖拽功能?nbsp; 
用法Q?sortable( 'enable' )  

option  
获取或设|元素的参数?nbsp; 
用法Q?sortable( 'option' , optionName , [value] )  

serialize  
获取或设|序列化后的每个item元素的id属性?nbsp; 
用法Q?sortable( 'serialize' , [options] )  

toArray  
获取序列化后的每个item元素的id属性的数组?nbsp; 
用法Q?sortable( 'toArray' Q?nbsp; 

refresh  
手动重新h当前sortable对象的item元素的排序?nbsp; 
用法Q?sortable( 'refresh' )  

refreshPositions  
手动重新h当前sortable对象的item元素的坐标,此方法可能会降低性能?nbsp; 
用法Q?sortable( 'refreshPositions' )  

cancel  
取消当前sortable对象中item元素的排序改变?nbsp; 
用法Q?sortable( 'cancel' )


排序后保存有两种ҎQ?span style="color: #ff0000;">一是cookieQ二?span style="color: #ff0000;">数据库配|文?/strong>{?br />q个是cookie  的例?大家可以参?http://www.cnblogs.com/tianxiangbing/archive/2010/01/26/jquery_sortable.html

下面是数据库的部分代?原作Q?br />    $(function() {
        var show = $(".loader"); 
        var orderlist = $(".orderlist");
        var listleft = $("div[id = 'column_left']");
        var listcenter = $("div[id = 'column_center']");
        var listright = $("div[id = 'column_right']");
        $( ".column" ).sortable({
        opacity: 0.5,//拖动的透明?br />        revert: true, //~冲效果
        cursor: 'move', //拖动的时候鼠标样?
        connectWith: ".column",
        //开始用update l果执行两次Q浪费资源,古改成stop
        //但是stop在元素没有改变位|的时候也会执行,
        //用update其他js会有问题Q^_^
        stop: function(){
            var new_order_left = []; //左栏布局
            var new_order_center = [];//中栏布局
            var new_order_right = [];//x布局
            listleft.children(".portlet").each(function() {
                new_order_left.push(this.title);
             });
            listcenter.children(".portlet").each(function() {
                new_order_center.push(this.title);
             });
            listright.children(".portlet").each(function() {
                new_order_right.push(this.title);
             });
            var newleftid = new_order_left.join(',');
            var newcenterid = new_order_center.join(',');
            var newrightid = new_order_right.join(',');
            $.ajax({
               type: "post",
               url: jsonUrl, //服务端处理程?
               data: { leftid: newleftid, centerid: newcenterid, rightid:newrightid},   //id:新的排列对应的ID,orderQ原排列序
//               beforeSend: function() {
//                    show.html(" 正在更新");
//               },
               success: function(msg) {
                    //alert(msg);
                    show.html("");
               }
            });
       }    
        });

原文Q?div>http://hb-keepmoving.iteye.com/blog/1154618


]]>
【{?0 个很的 jQuery 代码片段http://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/01/395891.html胡?/dc:creator>胡?/author>Fri, 01 Mar 2013 01:53:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/01/395891.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/395891.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/03/01/395891.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/395891.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/395891.html囄预加?br />
 1 (function($) {
 2   var cache = [];
 3   // Arguments are image paths relative to the current page.
 4   $.preLoadImages = function() {
 5     var args_len = arguments.length;
 6     for (var i = args_len; i--;) {
 7       var cacheImage = document.createElement('img');
 8       cacheImage.src = arguments[i];
 9       cache.push(cacheImage);
10     }
11   }
12 
13 jQuery.preLoadImages("image1.gif""/path/to/image2.png");

在新H口打开链接 (target=”blank”)


1 $('a[@rel$='external']').click(function(){
2      this.target = "_blank";
3 });
4 
5 /*
6    Usage:
7    <a >catswhocode.com</a>
8 */

当支?JavaScript 时ؓ body 增加 class


1 /* 该代码只?行,但是最单的用来浏览器是否支持 JavaScript 的方法,如果支持 JavaScript 在 body 元素增加一?nbsp;hasJS ?nbsp;class */
2 $('body').addClass('hasJS');

qx滚动面到某个锚?/h3>


 1 $(document).ready(function() {
 2     $("a.topLink").click(function() {
 3         $("html, body").animate({
 4             scrollTop: $($(this).attr("href")).offset().top + "px"
 5         }, {
 6             duration: 500,
 7             easing: "swing"
 8         });
 9         return false;
10     });
11 });

鼠标滑动时的渐入和渐?/h3>


1 $(document).ready(function(){
2     $(".thumbs img").fadeTo("slow"0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads
3 
4     $(".thumbs img").hover(function(){
5         $(this).fadeTo("slow"1.0); // This should set the opacity to 100% on hover
6     },function(){
7         $(this).fadeTo("slow"0.6); // This should set the opacity back to 60% on mouseout
8     });
9 });

制作{高的列


1 var max_height = 0;
2 $("div.col").each(function(){
3     if ($(this).height() > max_height) { max_height = $(this).height(); }
4 });
5 $("div.col").height(max_height);

在一些老的览器上启用 HTML5 的支?/h3>


 1 (function(){
 2     if(!/*@cc_on!@*/0)
 3         return;
 4     var e = "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}
 5 })()
 6 
 7 //然后在head中引入该js
 8 <!--[if lt IE 9]>
 9 <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
10 <![endif]-->

试览器是否支持某?CSS3 属?/h3>


 1 var supports = (function() {
 2    var div = document.createElement('div'),
 3       vendors = 'Khtml Ms O Moz Webkit'.split(' '),
 4       len = vendors.length;
 5 
 6    return function(prop) {
 7       if ( prop in div.style ) return true;
 8 
 9       prop = prop.replace(/^[a-z]/function(val) {
10          return val.toUpperCase();
11       });
12 
13       while(len--) {
14          if ( vendors[len] + prop in div.style ) {
15             // browser supports box-shadow. Do what you need.
16             // Or use a bang (!) to test if the browser doesn't.
17             return true;
18          }
19       }
20       return false;
21    };
22 })();
23 
24 if ( supports('textShadow') ) {
25    document.documentElement.className += ' textShadow';

获取 URL 中传递的参数


1 $.urlParam = function(name){
2     var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
3     if (!results) { return 0; }
4     return results[1|| 0;
5 }

用表单的回车键提交


1 $("#form").keypress(function(e) {
2   if (e.which == 13) {
3     return false;
4   }
5 });



]]>
【{?0Ƒ־L jQuery qȝ片演C和下蝲http://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383151.html胡?/dc:creator>胡?/author>Sun, 15 Jul 2012 11:58:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383151.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/383151.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383151.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/383151.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/383151.htmljQuery 是一个非怼U?JavaScript 框架Q用简单灵z,同时q有许多成熟的插件可供选择Q它可以帮助你在目中加入漂亮的效果Q其中之一是qȝ片效果的实现Q这是一U在有限的网늩间内 展示pd目旉常好的方法。今天这文章要l大家分享的?0Ƒ־L jQuery qȝ片插Ӟ怿里面一定会有你喜欢的?

Cloud Carousel (演示 | 下蝲)

Jqueryimage481 in Cool and Useful jQuery Image and Content Sliders and Slideshows

ShineTime (演示 | 下蝲)

Nivo Slider (演示 | 下蝲)

Interactive Photo Desk (演示 | 下蝲)

Beautiful Photo Stack Gallery with jQuery and CSS3 (演示 | 下蝲)

Micro Image Gallery: A jQuery Plugin (演示 | 下蝲)

Minimalistic Slideshow Gallery with jQuery (演示 | 下蝲)

Image Slider with Unique Effects (演示 | 下蝲)

Create image gallery in 4 lines of jQuery (演示 | 下蝲)

Slideshow with strip effects (演示 | 下蝲)

Nivo Zoom (演示 | 下蝲)

AD Gallery, gallery plugin for jQuery (演示 | 下蝲)

MLB.com Content Switcher with jQuery and CSS3 (演示 | 下蝲)

Create Scrollable Interface (演示 | 下蝲)

Animate Panning Slideshow with jQuery (演示 | 下蝲)

Image Scale Carousel (演示 | 下蝲)

Sudo Slider (演示 | 下蝲)

GALLERYVIEW (演示 | 下蝲)

Jquery Plugin MopSlider 2.4 (演示 | 下蝲)

jQuery Image Scroller (演示 | 下蝲)

Image Gallery Using jQuery and Flickr (演示 | 下蝲)

jQuery plugin: Wilq32.RotateImage (演示 | 下蝲)

jQZoom Evolution (演示 | 下蝲)

Photo gallery using jQuery and VisualLightBox (演示 | 下蝲)

Zoomimage (演示 | 下蝲)

YoxView (演示 | 下蝲)

Supersized (演示 | 下蝲)

AnythingSlider (演示 | 下蝲)

Photo Revealer (演示 | 下蝲)

Exposure (演示 | 下蝲)

Auto-Playing Featured Content Slider (演示 | 下蝲)

Horinaja (演示 | 下蝲)

S3 Slider (演示 | 下蝲)

Slide Deck (演示 | 下蝲)

Galleriffic (演示 | 下蝲)

Photo Gallery – Dark Theme (演示 | 下蝲)

jQuery morphing gallery (演示 | 下蝲)

Simple Accordion w/ CSS and jQuery (演示 | 下蝲)

Automatic Image Slider w/ CSS & jQuery (演示 | 下蝲)

Create a Slick and Accessible Slideshow Using jQuery (演示 | 下蝲)

Fancy Thumbnail Hover Effect w/ jQuery (演示 | 下蝲)

Coda Slider Effect (演示 | 下蝲)

Simple Controls Gallery (演示 | 下蝲)

Popeye (演示 | 下蝲)

Simple 演示 (演示 | 下蝲)

ImageFlow (演示 | 下蝲)

Moving Boxes (演示 | 下蝲)

SlideViewerPro (演示 | 下蝲)

Pirobox (演示 | 下蝲)

jQuery simple panorama viewer (演示 | 下蝲)

A Beautiful Apple-style Slideshow Gallery (演示 | 下蝲)

Flickr Photobar Gallery (演示 | 下蝲)

Step Carousel Viewer (演示 | 下蝲)

Zoom-Info (演示 | 下蝲)

Box Slider (演示 | 下蝲)

jQuery Panel Gallery (演示 | 下蝲)

Image Highlighting and Preview with jQuery (演示 | 下蝲)

Multimedia Gallery for Images, Video and Audio (演示 | 下蝲)

Awesome Mobile Image Gallery Web App (演示 | 下蝲)

您可能还喜欢

 

 

~译来源Q?a target="_blank">梦想天空 ◆ x前端开发技?◆ 分n|页设计资源

原文来自Q?a target="_blank">Cool and Useful jQuery Image and Content Sliders and Slideshows



]]>
【{】jQuery ToolsQWeb开发必备的 jQuery UI ?/title><link>http://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383150.html</link><dc:creator>胡?/dc:creator><author>胡?/author><pubDate>Sun, 15 Jul 2012 11:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383150.html</guid><wfw:comment>http://www.aygfsteel.com/xiaohuzi2008/comments/383150.html</wfw:comment><comments>http://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383150.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/383150.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/383150.html</trackback:ping><description><![CDATA[<div><div class="wmqeeuq" id="cnblogs_post_body"><h3>基本介绍</h3> <p>  jQuery Tools 是基?<a ><strong>jQuery</strong></a> 开发的|站界面库,包含|站最常用的TabsQ选项卡)、TooltipQ信息提C)、OverlayQ遮|、弹H)、ScrollableQ滚动控 Ӟ、Form ValidatorQ表单验证)、RangeinputQ范围选择Q、DateinputQ日期选择Q等众多功能?a target="_blank"><strong>jQuery Tools</strong></a> 提供了高自定义的API接口Q能够帮助开发者非常容易的实现所需要的功能Q带l用h佳的使用体验?/p> <p> </p> <p><a target="_blank"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://pic002.cnblogs.com/images/2012/36987/2012052018273449.jpg" alt="" /></a></p> <p> </p> <p>  相比 jQuery UIQjQuery Tools 提供了作为网站应用更需要用的功能QjQuery Tools 提供的功能分Z部分Q分别是 UI ToolsQForm Tools ?Tools BoxQ下面会Ҏ个功能模块分别作介绍Q另?nbsp;jQuery Tools 要比 jQuery UI 的界面更_Q可定制性更好。除此之外,jQuery Tools 核心代码使用 GZIP 压羃后只?.9KBQ及时包括搜有的扩展功能也才14KBQ要?jQuery UI 轻量很多?/p> <h3>UI Tools</h3> <p>  UI Tools 部分包括Tabs、Tooltip、Overlay和Scrollable四个功能模块Q各功能模块的Demo如下Q?/p> <h3>  TabsQ选项卡)</h3> <p> </p> <p><a target="_blank"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://pic002.cnblogs.com/images/2012/36987/2012052108475590.jpg" alt="" /></a></p> <p> </p> <ol><li><a title="The most import ui widget for the web" >Minimal setup for tabs</a></li><li><a title="The most import ui widget for the web" >Naming the tabs</a></li><li><a title="The most import ui widget for the web" >4 different skins with CSS</a></li><li><a title="The most import ui widget for the web" >Using mouseover to switch tabs</a></li><li><a title="The most import ui widget for the web" >Making wizards with the tabs</a></li><li><a title="The most import ui widget for the web" >Making accordions with tabs</a></li><li><a title="The most import ui widget for the web" >Customizing the accordion effect</a></li><li><a title="The most import ui widget for the web" >Horizontal accordion using the tabs</a></li><li><a title="The most import ui widget for the web" >Multiple tabs and accordion instances</a></li><li><a title="The most import ui widget for the web" >Handling browsers back button</a></li><li><a title="The most import ui widget for the web" >Loading tab contents with ajax</a></li><li><a title="The most import ui widget for the web" >AJAXed tabs with history support</a></li><li><a title="The most import ui widget for the web" >Slideshow plugin for the tabs</a></li></ol> <h3>  TooltipQ信息提C)</h3> <p> </p> <p><a target="_blank"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://pic002.cnblogs.com/images/2012/36987/2012052108492570.jpg" alt="" /></a></p> <p>  </p> <ol><li><a title="The second most important UI widget" >Basics of using the tooltip</a></li><li><a title="The second most important UI widget" >Using any HTML inside the tooltip</a></li><li><a title="The second most important UI widget" >Imitating browsers default tooltip</a></li><li><a title="The second most important UI widget" >Using tooltips in form fields</a></li><li><a title="The second most important UI widget" >Using tooltips in tables or lists</a></li><li><a title="The second most important UI widget" >Custom tooltip effect</a></li><li><a title="The second most important UI widget" >Dynamic positioning of the tooltip</a></li></ol> <h3>  OverlayQ遮|、弹H)</h3> <p> </p> <p><a target="_blank"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://pic002.cnblogs.com/images/2012/36987/2012052108502342.jpg" alt="" /></a></p> <p> </p> <ol><li><a title="Overlay your HTML with eye candy" >Minimal setup for overlay</a></li><li><a title="Overlay your HTML with eye candy" >The apple effect for overlay</a></li><li><a title="Overlay your HTML with eye candy" >Creating modal dialogs with overlay</a></li><li><a title="Overlay your HTML with eye candy" >Opening overlays programmatically</a></li><li><a title="Overlay your HTML with eye candy" >Overlays with different styles</a></li><li><a title="Overlay your HTML with eye candy" >Loading external pages into overlay</a></li><li><a title="Overlay your HTML with eye candy" >Multiple overlays on the same page</a></li><li><a title="Overlay your HTML with eye candy" >Creating a customized overlay effect</a></li></ol> <h3>  ScrollableQ信息滚动)</h3> <p> </p> <p><a target="_blank"><img style="width: 700px; display: block; margin-left: auto; margin-right: auto;" src="http://pic002.cnblogs.com/images/2012/36987/2012052108523270.jpg" alt="" /></a></p> <p> </p> <ol><li><a title="Scroll your HTML with eye candy" >Minimal setup for scrollable</a></li><li><a title="Scroll your HTML with eye candy" >A vertical scrollable</a></li><li><a title="Scroll your HTML with eye candy" >A simple scrollable image gallery</a></li><li><a title="Scroll your HTML with eye candy" >Gallery with multiple scrollables</a></li><li><a title="Scroll your HTML with eye candy" >A scrollable registration wizard</a></li><li><a title="Scroll your HTML with eye candy" >Scrollable plugins in action</a></li><li><a title="Scroll your HTML with eye candy" >Browser back button navigation</a></li><li><a title="Scroll your HTML with eye candy" >jQuery tools home page setup</a></li><li><a title="Scroll your HTML with eye candy" >A complete navigational system</a></li><li><a title="Scroll your HTML with eye candy" >Add and remove items from scrollable</a></li><li><a title="Scroll your HTML with eye candy" >Customizing the scrolling animation</a></li></ol> <h3>Form Tools</h3> <p>  Form Tools 部分包括Validator、Rangeinput和Dateinput三个功能模块Q各功能模块的Demo如下Q?/p> <p> </p> <p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://pic002.cnblogs.com/images/2012/36987/2012052108535646.jpg" alt="" /></p> <p> </p> <h3>  ValidatorQ表单验证)</h3> <ol><li><a title="HTML5 form validation made easy" >Minimal setup for validator</a></li><li><a title="HTML5 form validation made easy" >Custom input types and attributes</a></li><li><a title="HTML5 form validation made easy" >Server & client-side validation</a></li><li><a title="HTML5 form validation made easy" >Error Summary</a></li><li><a title="HTML5 form validation made easy" >Validator events in action</a></li><li><a title="HTML5 form validation made easy" >Localizing the validator</a></li></ol> <h3>  RangeinputQ范围选择Q?/h3> <ol><li><a title="HTML5 range input for humans" >Minimal setup for rangeinput</a></li><li><a title="HTML5 range input for humans" >A couple of vertical ranges</a></li><li><a title="HTML5 range input for humans" >Multiple small ranges</a></li><li><a title="HTML5 range input for humans" >A custom scrollbar for a DIV</a></li></ol> <h3>  DateinputQ日期选择Q?/h3> <ol><li><a title="HTML5 date input for humans" >Minimal setup for dateinput</a></li><li><a title="HTML5 date input for humans" >A large skin for Dateinput</a></li><li><a title="HTML5 date input for humans" >Customizing Dateinput behavior</a></li><li><a title="HTML5 date input for humans" >Prompting for start and end dates</a></li><li><a title="HTML5 date input for humans" >Calendar that is always available</a></li><li><a title="HTML5 date input for humans" >Localizing the Dateinput (french)</a></li></ol> <h3>Tools Box</h3> <p>  Tools Box 部分包括Expose、Flashembed和Combinations三个功能模块Q各功能模块的Demo如下Q?/p> <p> </p> <p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://pic002.cnblogs.com/images/2012/36987/2012052108545943.jpg" alt="" /></p> <p> </p> <h3>  ExposeQ突出重点)</h3> <ol><li><a title="Make your HTML elements stand out" >Minimal setup for expose</a></li><li><a title="Make your HTML elements stand out" >Styling the mask</a></li><li><a title="Make your HTML elements stand out" >Exposing a form</a></li><li><a title="Make your HTML elements stand out" >Exposing videos with a custom mask</a></li></ol> <h3>  FlashembedQ嵌入FlashQ?/h3> <ol><li><a title="The Future of Flash embedding" >Basics of Flash embedding</a></li><li><a title="The Future of Flash embedding" >Flashembed and jQuery</a></li><li><a title="The Future of Flash embedding" >Loading flash on a mouse click</a></li><li><a title="The Future of Flash embedding" >Placing HTML on top of a flash object</a></li><li><a title="The Future of Flash embedding" >Handling old flash versions</a></li><li><a title="The Future of Flash embedding" >Flashembed and Flowplayer</a></li></ol> <h3>  CombinationsQ整合功能)</h3> <ol><li><a title="Possibilities are endless. Get creative!" >HTML5 form inside an overlay</a></li><li><a title="Possibilities are endless. Get creative!" >An artist’s portfolio</a></li><li><a title="Possibilities are endless. Get creative!" >Speeding up the portfolio</a></li></ol> <p> </p> <h3>您可能还喜欢</h3> <p> </p> <ul><li><a target="_blank">Z HTML5 Canvas 的图片放大镜</a></li><li><a target="_blank">RoboVoice.comQ让你的|页会说?/a></li><li><a target="_blank">8个超的免费高质量图标搜索引?/a></li><li><a target="_blank">分n5个有的 JavaScript 代码片段</a></li><li><a target="_blank">推荐一个很的免费自助建站工具</a></li></ul> <p> </p> <p>本文链接Q?a target="_blank">jQuery ToolsQWeb开发必备的 jQuery UI ?/a></p> <p>~译来源Q?a target="_blank">梦想天空 ◆ x前端开发技?◆ 分n|页设计资源</a></p></div><div class="wmqeeuq" id="MySignature"><div class="wmqeeuq" id="AllanboltSignature"> <div> <div class="wmqeeuq" id="recom" style="float: left;"> <h3>推荐阅读</h3> <ul><li><a target="_blank" >jQuery ToolsQ必备的jQuery UI?/a></li><li><a target="_blank" >Web 开发h员和设计师必L章推?/a></li><li><a target="_blank">2011q度七款最?jQuery 插g发布</a></li><li><a target="_blank">24N常实用的 CSS3 工具l极收藏</a></li><li><a target="_blank">难以|信的HTML5和JavaScript实验</a></li><li><a target="_blank" >60Ƒ־L jQuery qȝ片演C和下蝲</a></li><li><a target="_blank" >15个清爽简U风格的 HTML5 |站作品</a></li><li><a target="_blank" >34个漂亮的应用E序后台理pȝ界面</a></li></ul> </div> <div style="margin-bottom:15px;margin-left:15px;float:left"> </div> </div> <div class="wmqeeuq" id="ckepop" style="float: right; position: relative; top: 35px; right: 20px;"> <div class="wmqeeuq" id="ckepop"> <a jiathis_txt="" jtico="" jtico_jiathis"="" target="_blank">分n刎ͼ</a> <a title="分n到新微?><span jiathis_separator="" jtico="" jtico_tsina"="">新浪微博</span></a> <a title="分nCh人网"><span jiathis_separator="" jtico="" jtico_renren"="">Zh|?/span></a> <a title="分n到MSN"><span jiathis_separator="" jtico="" jtico_msn"="">MSN</span></a> <a title="分n到QQI间"><span jiathis_separator="" jtico="" jtico_qzone"="">QQI间</span></a> <a title="分n到腾讯微?><span jiathis_separator="" jtico="" jtico_tqq"="">腾讯微博</span></a> <a><span title="累计分n13? id="jiathis_counter_110" jiathis_counter="" jiathis_bubble_style"="">13</span></a> </div> </div> <div> <p id="PSignature" style="line-height:20px;border-top: #e0e0e0 1px dashed; border-right: #e0e0e0 1px dashed; border-bottom: #e0e0e0 1px dashed; border-left: #e0e0e0 1px dashed; padding-top: 10px;padding-right: 10px;padding-bottom: 10px;padding-left: 60px; background: url(http://pic002.cnblogs.com/images/2010/36987/2010092119181033.png) #FFFAEA no-repeat 2% 50%;font-size:12px;">作者:<a target="_blank">p溪</a> <br /> 出处Q?a target="_blank">http://lhb25.cnblogs.com</a> <br />Ƣ迎M形式的{载,但请务必注明出处?</p></div> </div></div></div><img src ="http://www.aygfsteel.com/xiaohuzi2008/aggbug/383150.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaohuzi2008/" target="_blank">胡?/a> 2012-07-15 19:56 <a href="http://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383150.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【{】推?0N怼U?jQuery 工具提示插ghttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383148.html胡?/dc:creator>胡?/author>Sun, 15 Jul 2012 11:40:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383148.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/383148.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383148.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/383148.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/383148.html工具提示QTooltipQ在|站中的一个小功能Q但却有很重要的作用Q常用于昄一些温馨的提示信息。如果网站中的工hC功能做得非常有创意的话能够加深用户对网站印象。因此,今天q篇文章向大家推荐的20ƾ优U?nbsp;jQuery Tooltip 插g是用于帮助你制作漂亮的工具提示效果?

1. Dynamic tooltip

flowplayer-dynamic-tooltip-jquery-tooltip-plugin-for-web-design

 

2. jGrowl

stanlemon-jgrowl-jquery-tooltip-plugin-for-web-design
 

3. jQuery Horizontal Tooltips Menu Tutorials

queness-horizontal-tooltips-menu-tutorials-jquery-tooltip-plugin-for-web-design

 

4. Coda Popup Bubble

jqueryfordesigners-coda-popup-bubble-jquery-tooltip-plugin-for-web-design

 

5. The Tooltip

banner js ajax freebies css

 

6. TipTip

code-drewwilson-tiptip-jquery-tooltip-plugin-for-web-design

 

7. (mb)Tooltip

pupunzi-mb-tooltip-jquery-tooltip-plugin-for-web-design

 

8. vTip

vertigo-project-vtip-jquery-tooltip-plugin-for-web-design
 

10. jQuery Ajax Tooltip

rndnext-blogspot-jquery-ajax-tooltip-jquery-tooltip-plugin-for-web-design

 

11. Digg-style post sharing tool with jQuery

queness-digg-style-post-sharing-tool-jquery-tooltip-plugin-for-web-design

 

12. Input Floating Hint Box

nicolae-namolovan-googlepages-input-hint-box-jquery-tooltip-plugin-for-web-design

 

13. Simpletip

simpletip-craigsworks-jquery-tooltip-plugin-for-web-design

 

14. qTip

craigsworks-qtip-jquery-tooltip-plugin-for-web-design

 

15. Orbital Tooltip

userfirst-orbital-jquery-tooltip-plugin-for-web-design

 

16. Tooltip

bassistance-tooltip-jquery-tooltip-plugin-for-web-design

 

17. tipsy

onehackoranother-tipsy-jquery-tooltip-plugin-for-web-design

 

18. Easiest jQuery Tooltip Ever

cssglobe-easiest-jquery-tooltip-ever-jquery-tooltip-plugin-for-web-design

 

19. Shiny Tooltips

 

20. BeautyTips

lullabot-beautytips-jquery-tooltip-plugin-for-web-design

 

您你可能q喜?/h3>

 



]]>【{】jquery 体布局插g:Waterfallhttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383144.html胡?/dc:creator>胡?/author>Sun, 15 Jul 2012 10:16:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383144.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/383144.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/15/383144.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/383144.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/383144.html

体布局Q一Q?/p>

jQuery插g:jQuery.Waterfall.js, js的计方?/p>

jQuery1.4.4,IE8.0,opera,firefox,chrome试通过

围观L?http://3vke.com

下蝲地址:Waterfall on github

1.使用Ҏ:

①.加蝲jQuery?
②.加蝲jQuery.Waterfull.js , 必须在jQuery库之?
③.调用接口: $node.waterfull({/* 此处|选项, 可留I?*/}) , ?

$('#container').waterfall({})

2.讄选项:

{
    itemSelector:
'.post-home',   // 子元素id/class, 可留I?/span>
    columnCount:4,               // 列数,  U数? 可留I?/span>
    columnWidth:300              // 列宽? U数? 可留I?/span>
    isResizable: false,          // 自适应览器宽? 默认false
    isAnimated: false,           // 元素动画, 默认false
    Duration: 500,               // 动画旉
    Easing: "swing",             // 动画效果, 配合 jQuery Easing Plugin 使用
    endFn: function(){}          // 回调函数
}

3.Ajax说明:

$.ajax({
    url: Url,
    beforeSend: function() {},
    success: function(date) {
        $(
'#container').append(date).waterfall({});
    }
})

体布局Q二Q?/p>

固定宽度的流体布局的个人思\Q参考文献:@qiqiboy javascript 囄预加?nbsp;

思\如下Q?/p>

1.imgReady可以在图片没有加载完成之前,通过头信息获取到囄的大(q种Ҏ相当天才Q,于是我徏立一个局部的数组Q将囄高度储存h:Qdiv的高度亦可)

var argg= new Array()//例如?0文章,是一个length=10的数l?/pre> 

2.通过览器的宽度Q来判断一行可以放几张图(假定3张)Q再建立一个全局数组Q保存数据:

var args= new Array()//初始化数据,全部讑֮? args=[0,0,0];

3.排序Q用for循环Q每一ơ通过比较argg[i]和args的最|来确定下一个div攄的位|,攑֮之后Q把args的最值重新赋|

args[min]+=argg[i]

新版iphoto主题Q采用如上方法布局Q包含ajax后只?KbQ相当廉P新版首页观光地址Q?a target="_blank">http://icold.me/photo

1.体布局主题iPhoto新版首页观光地址Q?a target="_blank">http://icold.me/photo

2.体布局js计算Ҏ以及js源代码下?体布局Q三Q?nbsp;

 

 

体布局Q三Q?/p>

本文主要写固定宽度流体布局中的处理办法Q全文以iphoto主题ZQ?/p>

1.先看看Htmll构


<div id="container">
    
<div class="post-home">xxoo..</div>
    
<div class="post-home">xxoo..</div>
    
<div class="post-home">xxoo..</div>
    
<div class="post-home">xxoo..</div>
    
<div class="post-home">xxoo..</div>
    
</div>

#container宽度我设定ؓ1050px, .post-home宽度讑֮?50px,具体的css׃写了Q也是3列)

2.js的算?/strong>


jQuery(document).ready(function($) {
  var args 
= [000];
  
/*储存已排列的最??post-home的top? 初始时ؓ[0,0,0];
    没有储存left? 因ؓleft已经是知道的, [0,350,700];
  
*/
  sort($(
'#container > .post-home'));
  function sort(elem) { 
// elem是传入的DOM
    var r, // setTimeout相关变量
        m = 0,// 初始变量
        n = elem.length,// .post-home的数?/span>
        topArgs = new Array(); // 建立一个局部数l?/span>
    Array.prototype.min = function() {
      
/*q回数组中最值的序号
     0 ==>W一列(left = 0*350pxQ?br />     1 ==>W二列(left = 1*350pxQ?br />     2 ==>W三列(left = 2*350pxQ?br />      
*/
      var e,d 
= 0,b = this[0],c = this.length;
      
for (e = 1; e < c; e++) {
        
if (this[e] < b) {b = this[e];d = e}
      }
      
return d
    };
    Array.prototype.max 
= function() { // q回数组中的最大?/span>
      var d, b = this[0],c = this.length;
      
for (d = 1; d < c; d++) {
        
if (this[d] > b) {b = this[d]}
      }
      
return b
    };
    getHeight();
    function getHeight() {
      
if (m < n) { // 用来判断是不是获取了所有的.post-home的高?/span>
        var $this = elem.eq(m), // Wm?post-home
            h = parseInt($this.height()) + 16// Wm?post-home高度 + 16, 16是与下一个div的距?/span>
        topArgs.push(h); // 把第m?post-home高度, 攑ֈ数组中去
        m++// m累加
        r = setTimeout(getHeight, 10// setTimeout来@环函? 直到m==n 获取所有的高度
      }
      
if (m >= n) {
        clearTimeout(r); 
// 清除循环
        r = null;
        var d, e 
= topArgs.length; //初始化数?/span>
        for (d = 0; d < e; d++) { // for循环来给topleft赋?/span>
          var minNum = args.min(), // 获得args的最值的序号
              newTop = args[minNum],// 获得args的最?/span>
          $that = elem.eq(d); // Wd?post-home
          $that.css({ // for循环来给topleft赋?/span>
            position: "absolute",
            top: newTop,
            left: 
350 * minNumber
          });
          args[minNum] 
= newTop + topArgs[d];
          
/*改变args数组最值的大小
       q样args[minNum]׃是最了
       而是q一列下一?post-home的高?br />       如此循环Q下一个args[minNum]Q就是第二列的下一?post-home的高?br />     
*/
        }
        $(
'#container').css({
          height: args.max() 
//l?('#container')的高度赋?/span>
        });
      }
    }
  }
});

3.最重要的问?/strong>

假如不能及时得到img的高度,会错位Q所以这里推?a target="_blank">再谈javascript囄预加载技?/a>, 如果你嫌ȝQ可以用$(window).load(function(){})把上面的代码包括hQ?(window).load可以在图片加载完成之后执行内部的代码?/p>


http://3vke.com/2012/03/09/%E6%B5%81%E4%BD%93%E5%B8%83%E5%B1%80%E6%8F%92%E4%BB%B6waterfall/

]]>
[转]HTML5+JS手机web开发之jQuery Mobile初涉http://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/14/383103.html胡?/dc:creator>胡?/author>Sat, 14 Jul 2012 14:47:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/14/383103.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/383103.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/14/383103.html#Feedback1http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/383103.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/383103.html一、v始之?/h3>

我一直都是在PC上折腄늚Q这会儿怎么风向周边捣鼓h机网开发呢Q原因是公司原先使用Java开发的产品Q耗了不少人力财力Q但是最后的效果却不怎么好。因为,Androidpȝ一套东西,iPhone又是新的一套,折腾Mh呐?img src="http://image.zhangxinxu.com/image/blog/201111/tuxie.gif" alt="" />

于是ȝ发狠Q让我把手上的活都交出去Q专心折腾web版的Q看看最后效果如何?/p>

加上我觊觎手Z的开发学习很久了Q于是,一拍即合,搞v了手机开发方面的学习?/p>

分n是很好的提高自n学习的方法。因为分享过E中梳理了所学,往往会有些意想不到的心得与收莗如此利人利已的事情Q自然乐意ؓ之。于是,自己在文 章id > 2000 的这一历史性时刻,新徏了一?#8220;mobile相关”的分cȝ录,把移动相关的一些东西ȝQ整理,分n出去Q大家共勉?/p>

二、我的选择

昄Q当下手机web开发移不开CSS3 + HTML5以及JavaScript。目前,也应q而生了很多开发的框架Q有胶水层的Q也有显C层的(不罗列)。因Z人偏好以及筛选,军_使用PhoneGap实现与设备相机,通讯录等交互Q?code>jQuery Mobile实现面UI的显CZ及相关交互?/p>

如果旉_Q我x会针寚w目本w重新搞个更M灉|的交互框架。考虑到现实情况,q是军_使用他h的UI框架?/p>

下截图ؓ今儿个上?2011-11-1 11:11)跑通的W一?code>PhoneGap下的Android手机E序Q?br /> PhoneGap下AndroidW一个页面程序效果展C截?张鑫?鑫空?鑫生z? src=

不过PhoneGap是与胶水层打交道的东西,要说到这东西q需要些时日。我们可以先把目前投向与面昄相关的UI框架上。例如,本文要说LjQuery Mobile?/p>

三、我g的jQuery Mobile

目前为止QjQuery Mobile的正式版q没有出来,但是qƈ不妨对其的使用?a target="_blank" >官方首页上说其代码轻?lightweight code)。可能跟Sencha Touch相比实轻量。但是,在我看来Q本wؓ框架的原因)Q其实代码还是蛮啰嗦的(例如CSS文gmin后有49K之多Q。对于实际的目而言Q皮肤风g可能几种q存的,所以,?code>a~e的五U模杉K择实际有些多余Q很多都是打酱a的命?/p>

而且Q实际项目中的设计师设计东东的时候不可能是L跟着jQuery Mobile的UI来的。因此,我们隑օ会碰到对其模板进行修Ҏ是新d的情c?/p>

不过Q我可以信的是Q如果在个h|站或是其他一些非对外的中项目上使用jQuery Mobile的话Q一定会爽歪的!

然后Q还有一Ҏ得承认?code>jQuery Mobile的上手可?code>Sencha Touch快多了。其UI昄基本上就是基于HTML5?code>data-自定义属性来的,跟它的老爸爸jQuery一P实?cite>write less, do more.

面元素的UI昄完全可以ҎHTML代码内容和属性而来Q不需要Q何额外的JavaScript代码或是CSS代码Q有模有L手机面效果可以出炉。而且Q要出效果页面,你只要静下心׃1整天的时间把官方的介l文档看一就可以了。真q么单?/p>

例如下面q个U显C的面们(PC使用Chrome览器围观)?br /> 您可以狠狠地点击q里Q?a target="_blank" >jQuery Mobile的UI展示面

手机可以讉K以下地址Q?a target="_blank" href="ttp://www.zhangxinxu.com/jq/mobile/">http://www.zhangxinxu.com/jq/mobile/

q是在桌面版opera 10.1 mobile下的昄效果Q?br /> 默认q入Q?br /> demo面效果1 张鑫?鑫空?鑫生z? src=

选择“文章搜烦”?→ 点击搜烦框后Q?br /> demo面效果2 张鑫?鑫空?鑫生z? src=

如果是在Androidpȝ或是iPhone上,渐变效果Q^滑切换效果都会显露出来的?/p>

上面加v来差不多?0多个HTML面Q捣鼓了几个时出来的Q当然是在无敌模式下。ؓ什么快呢?因ؓ基本上没有动一Ҏ的CSS代码或是JavaScript代码。直接write HTML卛_。如果你对jQuery Mobile熟悉的话Q可以更快?/p>

语义?/strong>
要想使用jQuery MobileQ很重要的一点就是要注意语义化。到不是使用HTML5之类的标{(考虑到渐q增强,jQuery Mobile使用的还是XHTML时代的标{)Q而是div, p, ul ,li, h1~6{的使用?/p>

?code>jQuery Mobile标签下,不同的标{所对应的UI效果很多都已l定M。例如:

<div data-role="header">     <h1>鑫空?鑫生z?lt;/h1>     <a href="#" data-icon="arrow-r" data-iconpos="right">中文</a> </div>

上面q段data-role?code>header的div中,h1标签不仅仅是个标题了Q而是直接会修改当下页面的title|因此Q上面几行代码对应的面的title是“鑫空?鑫生z?#8221;Q即使你头部的title写的?#8220;今天是小光棍节,呼啦啦~~”?/p>

而后面的a标签文字虽然没有指定data-role="button"Q但是,谁叫他生?code>data-role="header"的div下呢Q于是,它就是个昄按钮的命。而且Q?code>JMobile自动其定位到右侧了?/p>

语义化的标签军_了其位置Q显C等。确实方便,但是有所限制。可谓有利有弊?/p>

q有列表li标签中的W一个图片,会自动变成列表羃略图{,好多好多Q你试一下就会发现这东西q是挺有意思的?/p>

嘛,不过吗,不用急,冰冻三尺非一日之寒,什么东襉K是慢慢积累的。才刚开始,说多了未必是好。所以,本文唠叨这么多?/p> 转自张鑫?鑫空?鑫生z?/a>[http://www.zhangxinxu.com]

]]>
6月䆾最受欢q的 15 个新?jQuery 插ghttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/12/382947.html胡?/dc:creator>胡?/author>Thu, 12 Jul 2012 14:53:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/12/382947.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/382947.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/12/382947.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/382947.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/382947.htmlhttp://www.oschina.net/news/30661/15-most-popular-jquery-plugins-of-june?from=20120708

]]>
jqery ajax h,资源回收http://www.aygfsteel.com/xiaohuzi2008/archive/2012/06/12/380589.html胡?/dc:creator>胡?/author>Tue, 12 Jun 2012 04:47:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/06/12/380589.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/380589.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/06/12/380589.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/380589.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/380589.html

通过查看jquery APIQ发现jqueryq有一?nbsp;complete对象Q是h完成后回调函?(h成功或失败之后均调用)?同时有两个参?span style="color: red; ">XMLHttpRequest, textStatus。所以,我们只需要在h完成后,传回的XMLHttprequest对象手工回收卛_Q代码如下:

$.ajax({
    url: "http://www.aizr.net",
    data: { name: "xxxx" },
    dataType: "xml",
    success: function (data, textStatus) { 
       //do something...
    },
    complete: function (XHR, TS) { XHR = null }
})

]]>
վ֩ģ壺 ˮ| | Դ| | ɽ| | º| | | ͨ| | | ˳| | ó| | ̨| | | | | | | | ɽ| ؿ˹| Ī| | | | ʯɽ| | ʤ| | | ɳƺ| | | | | |