<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
<title><![CDATA[jQuery资源宝库]]></title>
<link><![CDATA[http://www.itivy.com/jquery]]></link>
<description><![CDATA[每天给大家分享一点jQuery，同时也不断充实自己]]></description>
<language><![CDATA[zh-cn]]></language>
<copyright><![CDATA[]]></copyright>
<webMaster><![CDATA[]]></webMaster>
<generator><![CDATA[]]></generator>
<Image><![CDATA[]]></Image>
<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2012/2/9/jquery-php-make-switch.html]]></link>
<title><![CDATA[巧妙利用jQuery和PHP打造功能开关效果]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Thu, 09 Feb 2012 21:52:41 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>本文介绍了使用jQuery、PHP和MySQL实现类似360安全卫士防火墙开启关闭的开关，可以将此功能应用在产品功能的开启和关闭功能上。</p>
<p><img src="/Upload/EditorImage/image/jquery/201202/20120209214619_3282.gif" alt="" border="0" /></p>
<p>准备工作为了更好的演示本例，我们需要一个数据表，记录需要的功能说明及开启状态，表结构如下：</p>
<p></p>
<pre class="brush:sql;">CREATE TABLE `pro` (  
  `id` int(11) NOT NULL auto_increment,  
  `title` varchar(50) NOT NULL,  
  `description` varchar(200) NOT NULL,  
  `status` tinyint(1) NOT NULL default '0',  
  PRIMARY KEY  (`id`)  
) ENGINE=MyISAM  DEFAULT CHARSET=utf8; </pre><p></p>
<p>你可以向表中pro插入几条数据。</p>
<p><strong>index.php</strong></p>
<p>我们要在页面显示相关功能列表，使用PHP读取数据表，并以列表的形式展示。</p>
<p></p>
<pre class="brush:bash;">&lt;?php   
   require_once('connect.php'); //连接数据库   
   $query=mysql_query("select * from pro order by id asc");   
   while ($row=mysql_fetch_array($query)) {   
   ?&gt;   
   &lt;div class="list"&gt;   
     &lt;div class="fun_title"&gt;   
        &lt;span rel="&lt;?php echo $row['id'];?&gt;" &lt;?php if($row['status']==1){ ?&gt;   
class="ad_on" title="点击关闭"&lt;?php }else{?&gt;class="ad_off" title="点击开启"&lt;?php }?&gt;&gt;&lt;/span&gt;   
        &lt;h3&gt;&lt;?php echo $row['title']; ?&gt;&lt;/h3&gt;   
     &lt;/div&gt;   
     &lt;p&gt;&lt;?php echo $row['description'];?&gt;&lt;/p&gt;   
   &lt;/div&gt;   
 &lt;?php } ?&gt;</pre><p></p>
<p>连接数据库，然后循环输出产品功能列表。</p>
<p><strong>CSS</strong></p>
<p>为了渲染一个比较好的页面外观，我们使用CSS来美化页面，使得页面更符合人性化。使用CSS,我们只需用一张图片来标识开关按钮。</p>
<p><img src="/Upload/EditorImage/image/jquery/201202/20120209214837_0356.gif" alt="" border="0" /></p>
<p></p>
<pre class="brush:css;">.list{padding:6px 4px; border-bottom:1px dotted #d3d3d3; position:relative}   
.fun_title{height:28px; line-height:28px}   
.fun_title span{width:82px; height:25px; background:url(switch.gif) no-repeat;    
cursor:pointer; position:absolute; right:6px; top:16px}   
.fun_title span.ad_on{background-position:0 -2px}   
.fun_title span.ad_off{background-position:0 -38px}   
.fun_title h3{font-size:14px; font-family:'microsoft yahei';}   
.list p{line-height:20px}   
.list p span{color:#f60}   
.cur_select{background:#ffc} </pre><p></p>
<p>CSS代码，我不想详述，提示下我们使用了一张图片，然后通过background-position来定位图片的位置，这是大多数网站使用的方法，好处咱就不说了。</p>
<p><strong>jQuery</strong></p>
<p>我们通过单击开关按钮，及时请求后台，改变对应的功能开关状态。这个过程是一个典型的Ajax应用。通过点击开关按钮，前端向后台PHP发送post请求，后台接收请求，并查询数据库，并将结果返回给前端，前端jQuery根据后台返回的结果，改变按钮状态。</p>
<p></p>
<pre class="brush:js;">$(function(){   
    //鼠标滑向换色   
    $(".list").hover(function(){   
        $(this).addClass("cur_select");   
    },function(){   
        $(this).removeClass("cur_select");   
    });   
       
    //关闭   
    $(".ad_on").live("click",function(){   
        var add_on = $(this);   
        var status_id = $(this).attr("rel");   
        $.post("action.php",{status:status_id,type:1},function(data){   
            if(data==1){   
                add_on.removeClass("ad_on").addClass("ad_off").attr("title","点击开启");   
            }else{   
                alert(data);   
            }   
        });   
    });   
    //开启   
    $(".ad_off").live("click",function(){   
        var add_off = $(this);   
        var status_id = $(this).attr("rel");   
        $.post("action.php",{status:status_id,type:2},function(data){alert(data);     
            if(data==1){   
                add_off.removeClass("ad_off").addClass("ad_on").attr("title","点击关闭");   
            }else{   
                alert(data);   
            }   
        });   
    });   
}); </pre><p></p>
<p>说明，代码中，首先实现了鼠标滑向功能列表换色的功能(详见demo)，然后就是单击开关按钮，向后台action.php发送Ajax请求，提交
的参数是对应功能的id和type，用于后台区分请求的是哪个功能和请求的类型(开启和关闭)。其实，大家稍微留神，可以看出，根据Ajax请求成功返回
结果后，开关按钮动态改变样式，实现改变开关状态的功能。</p>
<p><strong>action.php</strong></p>
<p>后台action.php接收到前端的请求，根据参数执行SQL语句，更新对应功能的状态，成功后将结果返回给前端，请看代码：</p>
<p></p>
<pre class="brush:js;">require_once('connect.php');   
$id = $_POST['status'];   
$type = $_POST['type'];   
if($type==1){ //关闭   
    $sql = "update pro set status=0 where id=".$id;   
}else{ //开启   
    $sql = "update pro set status=1 where id=".$id;   
}   
$rs = mysql_query($sql);   
if($rs){   
    echo '1';   
}else{   
    echo '服务器忙，请稍后再试！';   
}  </pre><p></p>
<p>结束语通过本文您可以熟练掌握ajax在WEB开发中的应用，并能快速的应用到您的项目中。helloweba将一如既往的为广大开发者提供更具实用性的应用，致力于WEB前端技术的应用。</p>
<p>原文：http://www.helloweba.com/view-blog-153.html</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2012/2/8/jquery-marquee-design.html]]></link>
<title><![CDATA[利用jQuery marquee实现响应设计]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Wed, 08 Feb 2012 21:35:56 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>模板的设计综合多屏幕响应式设计和自运行的jQuery 
marquee(无间断滚动)技术，主要解决的难题是如何根据显示屏幕的大小利用jQuery的Ajax技术加载额外的互操作数据到模板中。利用CSS3
中的媒体查询功能以及包含一组通用的HTML和CSS标签，这个模板提供了非常出色的跨设备的用户体验。</p>
<p>注： 关于仅基于CSS的响应式设计和起始程序模板，更多信息 请参照 针对多屏幕开发的可自定义启动程序设计。</p>
<p><strong>总体介绍: jQuery 和 Dreamweaver</strong></p>
<p>Dreamweaver 
CS5.5其中一个很重要的特征是内嵌的jQuery支持。不论是jQuery的初学者还是一个很有经验的JavaScript开发人员， 
Dreamweaver包含的代码提示功能和内嵌的jQuery支持都无疑提高了开发效率(参照图1)。除了支持JQuery，Dreamweaver 
CS5.5也强力支持CSS3 媒体查询和多屏幕设计(也叫响应式设计)。</p>
<p style="text-align:center;"><img src="/Upload/EditorImage/image/jquery/201202/20120208213309_5906.jpg" alt="" border="0" /></p>
<p style="text-align:center;">图 1. Dreamweaver 支持jQuery代码提示功能.</p>
<p><strong>自定义jQuery 脚本</strong></p>
<p>模板中包含了一个自定义的脚本库，该脚本库由 Codify Design Studio 
开发，用来创建一个可交互主页marquee内容。滚动内容的实现完全基于标准HTML。在模板中marquee内容是由一组面板(也可以称做幻灯片)组
成，每个面板中包含了图片，标题以及用于面板切换的链接。面板和导航的内容是根据marquee_panels.html 
文件中的html动态创建的(参照图2)。因为设置了自动播放功能，所以marquee内容默认是自动播放的，当用户用鼠标操作时，该播放功能自动关闭以
响应用户操作。</p>
<p style="text-align:center;"><img src="/Upload/EditorImage/image/jquery/201202/20120208213340_2879.jpg" alt="" border="0" /></p>
<p style="text-align:center;">图2. 基于HTML内容动态生成面板和导航.</p>
<p>注: 特别鸣谢 Dimas Begunoff授予使用 jQuery Image Preloader plug-in的权限.</p>
<p><strong>基于屏幕大小动态加载</strong></p>
<p>当可视区域的宽度超过550个像素点时，该模板加载包含marquee 
内容的html页面，预加载图片，然后生成可交互的marquee内容。当可视区域的宽度少于550可像素点时，例如通过一个设备访问，marquee 
容器div会被隐藏，只会加载仅包含一个推荐条目的html 文件(参照图3)。这样做是为了在小屏幕上减少加载的内容，但保留CSS3媒体查询功能。</p>
<p>注：仅对Chrome用户。在这边文章发布的时候，Chrome禁止使用Ajax从本地操作系统加载本地文件，这将导致marquee或promo
 区域变成空白区域。但是Chrome支持当从Web服务器上或者本地运行的web service上加载某个文件。更多信息请关注 Chrome 
的开源浏览器项目。</p>
<p style="text-align:center;"><img src="/Upload/EditorImage/image/jquery/201202/20120208213410_8305.jpg" alt="" border="0" /></p>
<p style="text-align:center;">图 3. 基于jQuery返回的可视区域加载的html.</p>
<p>除了使用HTML，CSS和jQuery技术,该模板还包含PSD 文件，用来自定义设计元素来匹配品牌的需求。</p>
<p>观看视频： <a target="_blank" href="http://tv.adobe.com/watch/companion-videos-for-adc/responsive-design-with-jquery-marquee/">使用自定义模板</a></p>
<p>Chris Converse展示了如何使用Dreamweaver jQuery marquee 
模板根据屏幕的大小来加载可交互的数据。利用CSS3的媒体查询功能，并且包含一组通用html 和css 
标签，jQuery的Ajax制造了非常出色的跨设备的用户体验。</p>
<p><strong>预览和下载模板</strong></p>
<p>预览在不同的设备上marquee内容。 <a target="_blank" href="http://download.macromedia.com/pub/developer/html5/template_13.zip">下载</a>该模板相关的HTML，CSS和Photoshop 源文件。</p>
<p style="text-align:center;"><img src="/Upload/EditorImage/image/jquery/201202/20120208213440_5776.jpg" alt="" border="0" /></p>
<p style="text-align:center;">图 4. 预览在不同设备上的marquee内容</p>
<p style="text-align:left;">原文：http://www.adobe.com/cn/devnet/dreamweaver/articles/dw-template-responsive-jquery-marquee.html</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2012/1/15/jquery-media-plugin.html]]></link>
<title><![CDATA[jQuery多媒体播放器插件jQuery Media Plugin使用方法]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Sun, 15 Jan 2012 19:57:35 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>jQuery Media Plugin是一款基于jQuery的网页媒体播放器插件，它支持大部分的网络多媒体播放器和多媒体格式，比如：Flash, Windows Media Player, Real Player, Quicktime, MP3,Silverlight, PDF。它根据当前的脚本配置，自动将a标签替换成div，并生成object, embed甚至是iframe代码，至于生成object还是embed，jQuery Media会根据当前平台自动判别，因此兼容性方面非常出色。下面这段代码是jQuery Media生成后的结果：</p>
<p></p>
<pre class="brush:xhtml;">&lt;div class="media"&gt; 
    &lt;object width="450" height="250" attr1="attrValue1" attr2="attrValue2" 
        codebase="http://www.apple.com/qtactivex/qtplugin.cab" 
        classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"&gt; 
        &lt;param name="src"      value="myBetterMovie.mov"&gt; 
        &lt;param name="autoplay" value="true"&gt; 
        &lt;param name="param1"   value="paramValue1"&gt; 
        &lt;param name="param2"   value="paramValue2"&gt; 
        &lt;embed width="450" height="250" src="myBetterMovie.mov" autoplay="true" 
            attr1="attrValue1" attr2="attrValue2" param1="paramValue1" param2="paramValue2" 
            pluginspage="http://www.apple.com/quicktime/download/" &gt; &lt;/embed&gt; 
    &lt;/object&gt; 
&lt;/div&gt; </pre><p style="font-weight:bold;">具体使用方法</p>
<p>html标记代码</p>
<p></p>
<pre class="brush:xhtml;">&lt;a class="media" href="sample.mov"&gt;My Quicktime Movie&lt;/a&gt;
&lt;a class="media" href="sample.swf"&gt;My Flash Movie&lt;/a&gt;
&lt;a class="media" href="sample.wma"&gt;My Audio File&lt;/a&gt; </pre>初始化脚本：<p></p>
<p></p>
<pre class="brush:js;">$('.media').media(); </pre><p></p>
<p style="font-weight:bold;">选项</p>
<p>可以通过脚本对象或者jQuery Metadata Plugin来配置参数。</p>
<p>全局默认值：</p>
<p></p>
<pre class="brush:js;">$.fn.media.defaults = {
preferMeta: 1, // 如果为true, 则标记的meta值优先于脚本对象
autoplay: 0, // 标准化的跨播放器设置
bgColor: '#ffffff', // 背景颜色
params: {}, // 作为param元素添加到object标记中；作为属性添加到embed标记中
attrs: {}, // 作为属性添加到object以及embed中
flashvars: {}, // 作为flashvars参数或属性添加到flash中
flashVersion: '7', // 需要的最低flash版本
// 默认的flash视频和mp3播放器 // @see: http://jeroenwijering.com/?item=Flash_Media_Player
flvPlayer: 'mediaplayer.swf',
mp3Player: 'mediaplayer.swf',
// Silverlight选项 // @see http://msdn2.microsoft.com/en-us/library/bb412401.aspx
silverlight: {
  inplaceInstallPrompt: 'true', // 在适当的位置显示安装提示
  isWindowless: 'true', // 无窗口模式
  framerate: '24', // 最大帧速率
  version: '0.9', // Silverlight版本 onError: null, // onError回调函数
  onLoad: null, // onLoad回调函数
  initParams: null, // 对象初始化参数
  userContext: null // 传到load回调函数的参数
  }
}; </pre>我们也可以在执行初始化脚本的时候传入一些option参数进去，如下代码：<p></p>
<p></p>
<pre class="brush:js;">$('.media').media( { width: 400, height: 300, autoplay: true } ); </pre>再如代码：<p></p>
<p></p>
<pre class="brush:js;">$('.media').media({
  width: 450,
  height: 250,
  autoplay: true,
  src: 'myBetterMovie.mov',
  attrs: { attr1: 'attrValue1', attr2: 'attrValue2' }, // object/embed attrs
  params: { param1: 'paramValue1', param2: 'paramValue2' }, // object params/embed attrs
  caption: false // supress caption text
});</pre><p></p>
<p style="font-weight:bold;">‘src’选项</p>
<p>src选项指定了媒体文件的地址。它没有全局的默认值。如果未显示指定src选项的值，jQuery Media Plugin将使用href或者src属性的值来代替。</p>
<p style="font-weight:bold;">播放器和格式</p>
<p>jQuery Media Plugin默认为播放器和格式如下表所示：</p>
<p><table style="width:600px;" border="1" bordercolor="#dfc5a4" cellpadding="2">
<tbody><tr>
<th>播放器</th>
<th>文件格式</th>
</tr>
<tr>
<td>Quicktime</td>
<td>aif,aiff,aac,au,bmp,gsm,mov,mid, midi,mpg,mpeg,mp4,m4a,psd,qt,qtif, qif,qti,snd,tif,tiff,wav,3g2,3pg</td>
</tr>
<tr>
<td>Flash</td>
<td>flv, mp3, swf</td>
</tr>
<tr>
<td>Windows Media Player</td>
<td>asx, asf, avi, wma, wmv</td>
</tr>
<tr>
<td>Real Player</td>
<td>ra, ram, rm, rpm, rv, smi, smil</td>
</tr>
<tr>
<td>Silverlight</td>
<td>xaml</td>
</tr>
<tr>
<td>iframe</td>
<td>html, pdf</td>
</tr>
</tbody>
</table>
</p>
<p style="font-weight:bold;">mediaplayer.swf</p>
<p>上表说明了，mp3格式被自动对应到了flash播放器。全局配置中的$.fn.media.defaults.mp3Player指定MP3媒体由
mediaplayer.swf文件播放。该swf文件是一个小型的mp3和flash视频播放器，可以从这里下
载：<a target="_blank" href="http://www.longtailvideo.com/players/jw-flv-player/">http://www.longtailvideo.com/players/jw-flv-player/</a></p>
<p style="font-weight:bold;">SWFObject</p>
<p>这个脚本很常见，用来将Flash内容嵌入到网页中，你不用考虑不同平台的Flash嵌入方式。但这个文件并非必需。如果它加载了，jQuery Media 
Plugin将使用它，反之jQuery Media 
Plugin将按自己的默认方式生成object/embed标记。更多信息可以参考：<a target="_blank" href="http://code.google.com/p/swfobject/">http://code.google.com/p/swfobject/</a></p>
<p style="font-weight:bold;">iframe Player</p>
<p>默认情况下，PDF和HTML格式被映射到了iframe。它们将显示在iframe中而非object/embed标记中。</p>
<p style="font-weight:bold;">添加或者修改格式关联</p>
<p>这个操作可以由插件的mapFormat方法实现，如</p>
<p></p>
<pre class="brush:js;">$.fn.media.mapFormat('mp3','quicktime'); </pre>可用的播放器有：uicktime, flash, realplayer, winmedia, silverlight和iframe，确保播放器能够播放关联到它的文件格式。<p></p>
<p style="font-weight:bold;">在线demo</p>
<p><a href="http://www.malsup.com/jquery/media/video.html">Video/Flash Demo</a>         </p>
<p>
        <a href="http://www.malsup.com/jquery/media/audio.html">Audio Demo</a>         </p>
<p>
        <a href="http://www.malsup.com/jquery/media/sifr.html?v2">sIFR Demo</a>         </p>
<p>
        <a href="http://www.malsup.com/jquery/media/silver.html">Silverlight Demo</a>         </p>
<p>
        <a href="http://www.malsup.com/jquery/media/misc.html">Misc Demo (pdf, html)</a>     </p>
<p style="font-weight:bold;">下载</p>
<p>直接下载<a href="http://www.malsup.com/jquery/media/jquery.media.js?v.92">jquery.media.js</a>文件，或者在Github上<a target="_blank" href="http://github.com/malsup/media/tree/master">下载历史版本</a></p>
<p>参考文章：<a target="_blank" href="http://blog.ezcn8.com/2011/06/11/jquery-media-plugin%EF%BC%9A%E6%9B%B4%E6%96%B9%E4%BE%BF%E5%9C%B0%E5%B1%95%E7%A4%BA%E4%BD%A0%E7%9A%84%E5%A4%9A%E5%AA%92%E4%BD%93/">jQuery Media Plugin：更方便地展示你的多媒体</a></p>
<p>转载请自觉注明原文：<a target="_blank" href="http://www.itivy.com/jquery/archive/2012/1/15/jquery-media-plugin.html">http://www.itivy.com/jquery/archive/2012/1/15/jquery-media-plugin.html</a></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2012/1/9/jquery-blockui-dialog.html]]></link>
<title><![CDATA[jquery blockUI 扩展插件 Dialog]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Mon, 09 Jan 2012 14:55:35 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>对jQuery blockUI插件进行了小的封装扩展，支持confirm、alert、dialog弹出窗口提示信息，支持按钮回调事件。可以自定义css样式、覆盖blockUI的样式等  </p>
<p>首先要到jquery blockUI 官方网址：<a href="http://malsup.com/jquery/block/">http://malsup.com/jquery/block/</a>  </p>
<p>下载jquery.blockUI JS lib：<a href="http://malsup.com/jquery/block/jquery.blockUI.js?v2.38">http://malsup.com/jquery/block/jquery.blockUI.js?v2.38</a>  </p>
<p>而且还需要jquery lib：<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js</a>  </p>
 <p>jquery.blockUI.dialog.js</p>
<pre class="brush:js;">/***

 * jquery blockUI Dialog plugin 

 * v1.1 

 * @createDate -- 2012-1-4

 * @author hoojo

 * @email hoojo_@126.com

 * @requires jQuery v1.2.3 or later, jquery.blockUI-2.3.8

 * Copyright (c) 2012 M. hoo

 * Dual licensed under the MIT and GPL licenses:

 * http://hoojo.cnblogs.com

 * http://blog.csdn.net/IBM_hoojo

 **/

 

;(function ($) {

    

    var _dialog = $.blockUI.dialog = {};

    

    // dialog 默认配置

    var defaultOptions = {

        css: { 

            padding: '8px', 

            opacity: .7, 

            color: '#ffffff', 

            border: 'none', 

            'border-radius': '10px', 

            backgroundColor: '#000000' 

        },

        

        // 默认回调函数 取消或隐藏 dialog

        emptyHandler: function () {

            $.unblockUI();

        },

        

        // 用户回调函数

        callbackHandler: function (fn) {

            return function () {

                fn();

                defaultOptions.emptyHandler();

            };

        },

        

        // confirm 提示 html元素

        confirmElement: function (settings) {

            settings = settings || {};

            var message = settings.message || "default confirm message!";

            var okText = settings.okText || "ok";

            var cancelText = settings.cancelText || "cancel";

            

            if (typeof settings.onOk !== "function") {

                settings.onOk = this.emptyHandler;

            }

            if (typeof settings.onCancel !== "function") {

                settings.onCancel = this.emptyHandler;

            }

            var okCallback = this.callbackHandler(settings.onOk) || this.emptyHandler;

            var cancelCallback = this.callbackHandler(settings.onCancel) || this.emptyHandler;

            

            var html = [

                '&lt;div class="dialog confirm"&gt;',

                '&lt;p&gt;',

                message,

                '&lt;/p&gt;',

                '&lt;input type="button" value="',

                okText,

                '" class="btn ok-btn"/&gt;',

                '&lt;input type="button" value="',

                cancelText,

                '" class="btn cancel-btn"/&gt;'

            ].join("");

            

            var $el = $(html);

            $el.find(":button").get(0).onclick =  okCallback;

            $el.find(":button:last").get(0).onclick = cancelCallback;

            return $el;

        },

        

        // alert 提示html元素

        alertElement: function (settings) {

            settings = settings || {};

            var message = settings.message || "default alert message!";

            var okText = settings.okText || "ok";

            

            if (typeof settings.onOk !== "function") {

                settings.onOk = this.emptyHandler;

            }

            

            var okCallback = this.callbackHandler(settings.onOk) || this.emptyHandler;

            

            var html = [

                '&lt;div class="dialog alert"&gt;',

                '&lt;p&gt;',

                message,

                '&lt;/p&gt;',

                '&lt;input type="button" value="',

                okText,

                '" class="btn ok-btn"/&gt;'

            ].join("");

            

            var $el = $(html);

            

            $el.find(":button:first").get(0).onclick =  okCallback;

            return $el;

        }

    };

    

    var _options = defaultOptions;

    

    // 对外公开的dialog提示html元素，提供配置、覆盖

    $.blockUI.dialog.confirmElement = function () {

        return _options.confirmElement(arguments[0]);

    };

    

    $.blockUI.dialog.alertElement = function () {

        return _options.alertElement(arguments[0]);

    };

    

    // 提供jquery 插件方法

    $.extend({

        confirm: function (opts) {

            var i = (typeof opts === "object") ? 1 : 0;

            var defaults = {

                message: arguments[i++] || "default confirm message!",

                onOk: arguments[i++] || _options.emptyHandler(),

                onCancel: arguments[i++] || _options.emptyHandler(),

                okText: arguments[i++] || "ok",

                cancelText: arguments[i] || "cancel"

            };

            opts = opts || {};

            opts.css = $.extend({}, _options.css, opts.css);

            

            // 覆盖默认配置

            var settings = $.extend({}, _options, defaults, opts);

            settings = $.extend(settings, { message: _dialog.confirmElement(settings) });

            settings = $.extend({}, $.blockUI.defaults, settings);

            $.blockUI(settings);

        },

        alert: function (opts) {

            var i = (typeof opts === "object") ? 1 : 0;

            

            var defaults = {

                message: arguments[i++] || "default alert message!",

                onOk: arguments[i++] || _options.emptyHandler(),

                okText: arguments[i] || "ok"

            };

            

            opts = opts || {};

            opts.css = $.extend({}, _options.css, opts.css);

            

            var settings = $.extend({}, _options, defaults, opts);

            settings = $.extend(settings, { message: _dialog.alertElement(settings) });

            settings = $.extend({}, $.blockUI.defaults, settings);

            $.blockUI(settings);

        },

        

        // dialog提示

        dialog: function (opts) {

            var settings = $.extend({}, $.blockUI.defaults, _options, opts || {});

            $.blockUI(settings);

        },

        // 移除dialog提示框

        removeDialog: function () {

            _options.emptyHandler();

        }

    });

})(jQuery);</pre><p></p>
<p>应用样式文件block.dialog.css</p>
<p>dialog是全局样式，btn是所有按钮的样式、ok-btn是ok按钮样式、cancel-btn是取消按钮样式</p>
<pre class="brush:css;">.dialog {

    font-size: 12px;

}

 

.dialog .btn {

    border: 1px solid white;

    border-radius: 5px;

    min-width: 25%;

    width: auto;

}

 

.dialog .ok-btn {

    background-color: #ccc;

}

 

.dialog .cancel-btn { 

    /*background-color: #aeface;*/

    margin-left: 10%;

}</pre>examples.html<br />
<pre class="brush:xhtml;">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;

&lt;html&gt;

  &lt;head&gt;

    &lt;title&gt;blockUI Dialog Examples&lt;/title&gt;

    

    &lt;meta http-equiv="author" content="hoojo"&gt;

    &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;

    

    &lt;link rel="stylesheet" href="blockUI/block.dialog.css" /&gt;

    &lt;script type="text/javascript" charset="UTF-8" src="mobile/jquery-1.6.4.js"&gt;&lt;/script&gt;

    &lt;script type="text/javascript" charset="UTF-8" src="blockUI/jquery.blockUI-2.3.8.js"&gt;&lt;/script&gt;

    &lt;script type="text/javascript" charset="UTF-8" src="blockUI/jquery.blockUI.dialog-1.1.js"&gt;&lt;/script&gt;

    

    &lt;script type="text/javascript"&gt;

        ;(function ($) {

            $(function () {

            

                // dialog 提示框

                $("#dialog").click(function () {

                    //$.dialog();

                    //$.dialog({message: $("#callback")});

                    $.dialog({

                        //theme: true, // 设置主题需要jquery UI http://www.malsup.com/jquery/block/theme.html                

                        title: "dialog",

                        message: $("#callback"),

                        fadeIn: 1000,

                        fadeOut: 1200

                    });

                    setTimeout($.removeDialog, 2000);

                });

                

                // 带确定、取消按钮提示框，支持事件回调，及message等属性配置

                $("#confirm").click(function () {

                    $.confirm({

                        message: "你确定要删除吗？",

                        okText: "确定",

                        cancelText: "取消",

                        onOk: function () {

                            alert("你点击了确定按钮");

                        },

                        onCancel: function () {

                            alert("你点击了取消按钮");

                        }

                    });

                });    

                

                // 警告提示框 对象模式配置css、message、按钮文本提示

                $("#alert").click(function () {

                    $.alert({

                        message: "你确定要删除吗？",

                        okText: "确定",

                        css: {

                            "background-color": "white",

                            "color": "red"

                        },

                        onOk: function () {

                            alert("你点击了确定按钮");

                        }

                    });

                });

                

                // 非对象配置属性，多个参数配置

                /**

                  $.confirm 方法参数config配置介绍：

                  当第一个参数是一个对象：

                  对象中可以出现以下属性配置，并且可以出现$.blockUI的配置

                      {

                        message: arguments[i++] || "default confirm message!",

                        onOk: arguments[i++] || _options.emptyHandler(),

                        onCancel: arguments[i++] || _options.emptyHandler(),

                        okText: arguments[i++] || "ok",

                        cancelText: arguments[i] || "cancel"

                    }

                    message 是提示框的提示信息

                    onOk是确定按钮的click回调函数

                    onCancel 是取消按钮的click事件回调方法

                    okText是ok按钮的文字 默认是ok

                    cancelText是cancel按钮的文本内容

                  

                  如果第一个参数不是一个对象，那么

                      参数1表示 message 及提示文字

                    参数2表示ok按钮的click事件回调函数

                    参数3表示cancel按钮的click事件回调函数

                    参数4表示ok按钮的文本

                    参数5表示cancel按钮的文本内容

                    

                  注意：如果第一参数是一个对象，后面又出现了相应的参数配置；这种情况下对象配置优先于

                  后面的参数配置，而且参数的位置也会改变：

                      参数1是对象配置

                    参数2表示 message 及提示文字

                    参数3表示ok按钮的click事件回调函数

                    参数4表示cancel按钮的click事件回调函数

                    参数5表示ok按钮的文本

                    参数6表示cancel按钮的文本内容

                */

                $("#confirm2").click(function () {

                    $.confirm({ message: "is a message", timeout: 3000 }, "message", function () {

                            alert("success");

                        }, function () {

                            alert("failure");

                        }, "按钮");

                });    

                

                /**

                   第一个参数是对象配置，当对象配置中出现的选项会覆盖后面的参数配置

                   $.alert 方法 config 介绍：

                   当第一个参数 是一个对象：

                     {

                         message: arguments[i++] || "default alert message!",

                         onOk: arguments[i++] || _options.emptyHandler(),

                         okText: arguments[i] || "ok"

                    }

                    message 是提示框的提示信息

                    onOk是确定按钮回调函数

                    okText是ok按钮的文字 默认是ok

                    

                  当第一个参数不是一个对象的情况下，那么

                    参数1表示 message 及提示文字

                    参数2表示ok按钮的click事件

                    参数3表示ok按钮的文本

                    

                    注意：如果第一个参数是一个对象，对象中出现的配置：message、onOk、okText，这些配置将会

                    覆盖后面的配置，也就是说这些配置在第一个参数中出现后，后面的参数就不需要

                 */

                $("#alert2").click(function () {

                    $.alert({

                        css: {

                            "background-color": "red"

                        },

                        timeout: 1200,

                        onOk: function () {

                            alert("确定");

                        }

                    }, 

                    "你有一条消息", 

                    function () {

                        alert("被覆盖");

                    }, "yes?");

                });        

                

                var _confirm = function (msg) {

                    $.confirm({

                        message: msg,

                        onOk: function () {

                            alert("你点击了确定按钮");

                        },

                        onCancel: function () {

                            alert("你点击了取消按钮");

                        }

                    });

                };

                $("#confirm3").click(function () {

                    _confirm("message");

                });        

                

                var _alert = function (msg) {

                    $.alert({

                        message: msg,

                        css: {

                            "background-color": "white",

                            "color": "red"

                        },

                        onOk: function () {

                            alert("你点击了确定按钮");

                        }

                    });

                }

                $("#alert3").click(function () {

                    _alert();

                });    

            });

        })(jQuery);

    &lt;/script&gt;

    

  &lt;/head&gt;

      

  &lt;body&gt;

      &lt;ul&gt;

          &lt;h2&gt;jQuery blockUI Dialog Demos&lt;/h2&gt;

          &lt;li&gt;dialog demo &lt;input type="button" value="dialog" id="dialog"/&gt;&lt;/li&gt;

          &lt;li&gt;confirm callback demos&lt;input type="button" value="confirm" id="confirm"/&gt;&lt;/li&gt;

          &lt;li&gt;confirm callback demos 2&lt;input type="button" value="confirm" id="confirm2"/&gt;&lt;/li&gt;

          &lt;li&gt;confirm callback demos 3&lt;input type="button" value="confirm" id="confirm3"/&gt;&lt;/li&gt;

          &lt;li&gt;alert callback demos&lt;input type="button" value="alert" id="alert"/&gt;&lt;/li&gt;

          &lt;li&gt;alert callback demos 2&lt;input type="button" value="alert" id="alert2"/&gt;&lt;/li&gt;

          &lt;li&gt;alert callback demos 3&lt;input type="button" value="alert" id="alert3"/&gt;&lt;/li&gt;

      &lt;/ul&gt;

      

      &lt;div style="display: none;"&gt;

          &lt;div id="callback"&gt;

              &lt;p&gt;ok or cancel? asdfaf jQuery blockUI Dialog Demos jQuery blockUI Dialog Demos jQuery blockUI Dialog Demos jQuery blockUI Dialog Demos&lt;/p&gt;

              &lt;input type="button" value="OK" class="btn ok-btn"/&gt;

              &lt;input type="button" value="Cancel" class="btn cancel-btn"/&gt;

          &lt;/div&gt;

      &lt;/div&gt;

  &lt;/body&gt;

&lt;/html&gt;</pre><p></p>
<p>截图效果</p>
<p>confirm</p>
<p><img src="/Upload/EditorImage/image/jquery/201201/20120109145357_1605.png" alt="" border="0" /></p>
<p>alert</p>
<p><img src="/Upload/EditorImage/image/jquery/201201/20120109145417_3005.png" alt="" border="0" /></p>
<p>原文链接：http://www.cnblogs.com/hoojo/archive/2012/01/05/2313059.html</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2012/1/7/some-image-effects.html]]></link>
<title><![CDATA[分享几个超级震憾的图片特效]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Sat, 07 Jan 2012 01:26:01 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>前两天分享了关于按钮和导航的资源，原文分别是<a href="http://www.itivy.com/jquery/archive/2012/1/5/jquery-css-button.html" target="_blank">玩转jQuery按钮，请告诉我你最喜欢哪些？</a>和<a href="http://www.itivy.com/jquery/archive/2012/1/5/good-menu.html" target="_blank">分享几个个人觉得挺漂亮的导航</a>，没看过的盆友可以去临幸一下。这次主要是来分享几个个人觉得十分震憾的图片特效，有jQuery的，有CSS3的，有很萌的乌鸦动画，也有简单朴实的图片播放动画，当然有些你可能已经看到过了，不过也没关系，你能路过就算是对我的支持了。</p>
 <h4><a href="http://www.malsup.com/jquery/corner/">jQuery Rounded Corners</a></h4>
 <p>各种圆角，太犀利了。有了这个，你还在为你的圆角实现准备N张图片来拼凑么？</p>
 <p><a href="http://www.malsup.com/jquery/corner/" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614965100951657image_17.png" border="0" height="354" width="574" /></a></p>
 <h4><a href="http://www.itivy.com/klvoek/archive/2011/12/23/bing-tree-snow.html">青松雪舞-必应的美丽世界</a></h4>
 <p>貌似bing的首页一直都挺有创意的，这就是某一次首页的一张瀑布动画的图片，美丽的雪松，豪迈的瀑布，给力。需要HTML5支持，最好用chrome，所以就麻烦你切换成支持HTML5的浏览器看了。==！加载会有点慢，要等等。</p>
 <p><a href="http://www.itivy.com/klvoek/archive/2011/12/23/bing-tree-snow.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614965370333606image_18.png" border="0" height="517" width="760" /></a></p>
 <h3><a href="http://www.itivy.com/ivy/archive/2011/10/12/google-animation.html">Google首页纪念美国粘土动画大师阿特·克洛基【示例及源码】</a></h3>
 <p>这个是Google为纪念美国粘土动画大师阿特克洛基而制作的粘土小人动画，相当给力。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2011/10/12/google-animation.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614965382586077image_19.png" border="0" height="159" width="400" /></a></p>
  <h3><a href="http://www.itivy.com/ivy/archive/2011/10/27/css3-walking-example.html">一个用纯CSS3制作的人物步行动画</a></h3>
 <p>这个特效是用纯CSS3制作而成，模拟人物的步行，震憾呐。当然这个需要比较新的firefox和chrome才能观看。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2011/10/27/css3-walking-example.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614965428705080image_20.png" border="0" height="568" width="560" /></a></p>
 <h3><a href="http://www.itivy.com/ivy/archive/2011/12/10/jquery-image-scroller.html">非常简洁的jQuery图片横向滚动示例及源码下载</a></h3>
 <p>这个特效比较朴实，一个基于jQuery的图片横向播放动画，十分实用。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2011/12/10/jquery-image-scroller.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614965456607832image_21.png" border="0" height="177" width="788" /></a></p>
 <h3><a href="http://www.itivy.com/ivy/archive/2011/12/11/js-weibo-image-scale-and-rotate.html">JS仿微博的图片缩放和旋转示例及源码下载</a></h3>
 <p>微博大家都用过，在看那些图片帖子时，你可以放大缩小和翻转图片，下面的这个就是这些功能，赶紧下载试试吧。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2011/12/11/js-weibo-image-scale-and-rotate.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614965625665948image_22.png" border="0" height="424" width="559" /></a></p>
 <h3><a href="http://www.itivy.com/ivy/archive/2011/12/12/jquery-fly-bird.html">jquery乌鸦飞行动画</a></h3>
 <p>这只乌鸦够萌的，貌似飞得好开心的样子，一起来围观吧。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2011/12/12/jquery-fly-bird.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614965675056186image_23.png" border="0" height="257" width="715" /></a></p>
 <h3><a href="http://www.itivy.com/ivy/archive/2011/12/14/jquery-css-paging-ads.html">jQuery结合CSS实现右上角翻页效果示例及源码</a></h3>
 <p>这是一个网页右上角撕页效果，用来放些广告比较合适，既大气又能尽可能小地给用户带来麻烦。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2011/12/14/jquery-css-paging-ads.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614965697983270image_24.png" border="0" height="331" width="315" /></a></p>
     <p>好了，就先搞这些了，下回再说。</p>
 <p>转载请自觉注明来源：<a target="_blank" href="http://www.itivy.com/jquery/archive/2012/1/7/some-image-effects.html">http://www.itivy.com/jquery/archive/2012/1/7/some-image-effects.html</a></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2012/1/5/good-menu.html]]></link>
<title><![CDATA[分享几个个人觉得挺漂亮的导航]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Thu, 05 Jan 2012 23:37:39 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>昨天分享了<a href="http://www.itivy.com/jquery/archive/2012/1/5/jquery-css-button.html" target="_blank">十几个漂亮的jQuery按钮</a>，今天来一起看看几个个人觉得比较好的导航。有好几个导航是仿的，比如仿苹果、仿猪八戒等等，但仿得还都不错。也有不少是基于jQuery的。特别是像我这样的懒人，就可以在这些基础上修修改改作为自己网站项目的导航。不过话说回来，学习欣赏为主，呵呵。好吧一起来看看这些导航吧。</p>
 <p><a href="http://www.jeremymartin.name/projects.php?project=kwicks">Kwicks for jQuery</a></p>
 <p>这个导航非常有个性，鼠标滑过，导航渐渐展开，效果不错，可以看看。</p>
 <p><a href="http://www.jeremymartin.name/projects.php?project=kwicks" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614034383021712image_15.png" border="0" height="204" width="484" /></a></p>
 <p><a href="http://www.jeremymartin.name/examples/kwicks.php?example=1" target="_blank">在线示例</a></p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/3/alipay-nav.html" target="_blank">仿支付宝的产品推广精美导航【源码下载】</a></p>
 <p>这是一个仿支付宝的产品推广导航，我想说这几个图标不错，还能分屏展示。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/3/alipay-nav.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;width:802px;height:107px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614034453229719image_16.png" border="0" /></a></p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/4/zhubajie-nav.html" target="_blank">仿猪八戒2010首页的导航【源码下载】</a></p>
 <p>猪八戒网是国内最大的威客平台网站，下面是它2010年时的导航，当然现在已经改版了，不过看起来还是挺不错的样子。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/4/zhubajie-nav.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;width:796px;height:63px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614034477293514image_17.png" border="0" /></a></p>
 <p><a href="http://tympanus.net/Tutorials/FixedNavigationTutorial/" target="_blank">左侧弹出导航</a></p>
 <p>这款导航又是比较有个性的一个，它固定在左侧栏，等你鼠标滑过去就展开来，挺润滑的。</p>
 <p><a href="http://tympanus.net/Tutorials/FixedNavigationTutorial/" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614034497089737image_18.png" border="0" height="204" width="484" /></a></p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/3/jquery-hv-nav.html" target="_blank">jQuery竖向弹性导航</a></p>
 <p>这个导航是基于jQuery的，是有弹性伸缩的竖向导航，还不错。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/3/jquery-hv-nav.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614034536217687image_19.png" border="0" height="355" width="523" /></a></p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/4/flash-js-css-nav.html" target="_blank">仿Flash的Javascript+CSS的滑动菜单【源码下载】</a></p>
 <p>这个导航的特点是它类似Flash的滑动特效，是用js和css实现的。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/4/flash-js-css-nav.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614034558424336image_20.png" border="0" height="320" width="467" /></a></p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/5/jquery-apple-menu.html" target="_blank">MAC样式的导航【源码下载】</a></p>
 <p>这个是仿MAC的导航，可能很多朋友都已经看到过了，但是很经典，所以我还是把它发了上来，没看过的小盆友可要收藏了哦。</p>
 <p><a href="http://www.itivy.com/ivy/archive/2012/1/5/jquery-apple-menu.html" target="_blank"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634614034585000684image_21.png" border="0" height="105" width="629" /></a></p>
 <p>其实呢，还有很多导航，只是觉得那些大家应该大部分都看过了，于是我把这几个我觉得最给力的导航拿了出来与大家分享。就这样吧。想想下次分享什么了呢，大家有建议么</p>
<p>另外，转载请表明原文来自：<a target="_blank" href="http://www.itivy.com/jquery/archive/2012/1/5/634614034589573026.html">http://www.itivy.com/jquery/archive/2012/1/5/634614034589573026.html</a></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2012/1/5/jquery-css-button.html]]></link>
<title><![CDATA[玩转jQuery按钮，请告诉我你最喜欢哪些？]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Thu, 05 Jan 2012 01:18:21 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>在Web的世界里，按钮对于我们来说再也普通不过了，当然也用得比较多。今天这篇文章我主要向大家分享20个基于jQuery和CSS技术的按钮，这些基于jQuery的按钮都非同凡响，所以我在标题里用了“令人惊叹”这一个词。希望这些jQuery按钮能给你带来帮助，好了，来一起看看这些漂亮的按钮吧。</p>
 <p>英文原文中有些重复和打不开链接的例子我去掉了。</p>
 <p>注：转载请注明以下信息，否则保留那个什么的权利</p>
 <p>英文原文：<a title="http://speckyboy.com/2010/05/26/20-awesome-jquery-enhanced-css-button-techniques/" href="http://speckyboy.com/2010/05/26/20-awesome-jquery-enhanced-css-button-techniques/">http://speckyboy.com/2010/05/26/20-awesome-jquery-enhanced-css-button-techniques/</a></p>
 <p>译文链接：<a target="_blank" href="http://www.itivy.com/jquery/archive/2012/1/5/jquery-css-button.html">http://www.itivy.com/jquery/archive/2012/1/5/jquery-css-button.html</a></p>
 <h4><a href="http://www.tutorial9.net/photoshop/creative-button-animations-with-sprites-and-jquery-part-1/">Creative Button Animations with Sprites and jQuery</a></h4>
 <p>这篇文章主要是展示了一个利用css sprites和jquery实现的鼠标滑过按钮的效果，第一部分教程主要告诉大家如何利用ps等画图工具制作这个精美的按钮。第二部分教程主要是将设计好的按钮图转换成HTML和CSS，并利用jQuery给这个按钮加上动画特效。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230498159381image_2.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230516203276image_thumb.png" border="0" height="239" width="644" /></a></p>
 <p><a href="http://www.tutorial9.net/photoshop/creative-button-animations-with-sprites-and-jquery-part-1/" target="_blank">第一部分教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://www.tutorial9.net/web-tutorials/creative-button-animations-with-sprites-and-jquery-part-2/" target="_blank">第二部分教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://tutorial9.net/demos/button-sprites/demo.html" target="_blank">在线示例</a></p>
 <h4><a href="http://davidwalsh.name/github-css">GitHub-Style Buttons with CSS and jQuery (or MooTools, or the Dojo JavaScript)</a></h4>
 <p>这个按钮教程主要是介绍了一个仿GitHub的按钮特效，用到了一点点HTML、CSS、jQuery。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230529835291image_4.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230545791914image_thumb_1.png" border="0" height="139" width="644" /></a></p>
 <p><a href="http://davidwalsh.name/github-css" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://davidwalsh.name/dw-content/github-button.php" target="_blank">在线示例</a></p>
 <h4><a href="http://www.cssnewbie.com/cross-browser-rounded-buttons/">Cross-Browser Rounded Buttons with CSS3 and jQuery</a></h4>
  <p>这是一个带圆角的<a href="http://www.itivy.com/jquery" target="_blank">jquery按钮</a>，放心，你不必担心在不同浏览器中会没有圆角，因为他几乎兼容所有版本的浏览器，包括IE6。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230563949460image_6.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230580410584image_thumb_2.png" border="0" height="179" width="644" /></a></p>
 <p><a href="http://www.cssnewbie.com/cross-browser-rounded-buttons/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://www.cssnewbie.com/example/cross-browser-rounded-buttons/" target="_blank">在线示例</a></p>
 <h4><a href="http://www.swizec.com/code/styledButton/">jQuery Imageless Buttons a la Google</a></h4>
 <p>这个jquery按钮则是仿Google搜索的按钮，你可以用少量的css代码去自定义这些按钮的样式。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230595797602image_8.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230611401347image_thumb_3.png" border="0" height="179" width="644" /></a></p>
 <p><a href="http://www.swizec.com/code/styledButton/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://www.swizec.com/code/styledButton/" target="_blank">在线示例</a></p>
 <h4><a href="http://sixrevisions.com/tutorials/web-development-tutorials/create-an-animated-call-to-action-button/">Animated “Call to Action” Button</a></h4>
 <p>这个<a href="http://www.itivy.com/jquery" target="_blank">jquery按钮</a>也是一个鼠标滑过特效，鼠标滑过时按钮出现渐变效果。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230648539830image_10.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230691130075image_thumb_4.png" border="0" height="242" width="644" /></a></p>
 <p><a href="http://sixrevisions.com/tutorials/web-development-tutorials/create-an-animated-call-to-action-button/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://sixrevisions.com/demo/call-to-action-button/demo.html" target="_blank">在线示例</a></p>
 <h4><a href="http://www.webstuffshare.com/2010/04/nice-menu-css-animation-jquery-animate/">Nice Menu : CSS Animation &amp; jQuery Animate</a></h4>
 <p>这个jquery按钮也是鼠标滑过特效，不同的是，当鼠标滑过时，按钮的padding发生变化，并且是带有动画的哦。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230714192669image_12.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230737546776image_thumb_5.png" border="0" height="178" width="644" /></a></p>
 <p><a href="http://www.webstuffshare.com/2010/04/nice-menu-css-animation-jquery-animate/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://webstuffshare.com/demo/CSSNiceMenu/" target="_blank">在线示例</a></p>
 <h4><a href="http://www.jankoatwarpspeed.com/post/2009/03/11/How-to-create-Skype-like-buttons-using-jQuery.aspx">Skype-Like Buttons Using jQuery</a></h4>
 <p>这个jquery按钮非常有特色，是仿Skype的，当你鼠标移上去的时候，呵呵，自己去试试，我不说了。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230745750898image_14.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230753410509image_thumb_6.png" border="0" height="178" width="644" /></a></p>
 <p><a href="http://www.jankoatwarpspeed.com/post/2009/03/11/How-to-create-Skype-like-buttons-using-jQuery.aspx" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://www.jankoatwarpspeed.com/examples/skype_buttons/" target="_blank">在线示例</a></p>
 <h4><a href="http://papermashup.com/jquery-iphone-style-ajax-switch/">jQuery iPhone Style Ajax Switch</a></h4>
 <p>呵呵，又是一个比较有特色的jquery按钮，这个是仿iPhone开锁键的，还不错，可以看看。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230765516186image_16.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230778442921image_thumb_7.png" border="0" height="132" width="644" /></a></p>
 <p><a href="http://papermashup.com/jquery-iphone-style-ajax-switch/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://papermashup.com/demos/ajax-switch/" target="_blank">在线示例</a></p>
 <h4><a href="http://www.filamentgroup.com/lab/styling_buttons_and_toolbars_with_the_jquery_ui_css_framework/">jQuery UI CSS Framework Buttons and Toolbars</a></h4>
 <p>OH，这个NB了，这是基于jquery ui的按钮，这个jquery按钮也可以用来做工具栏的按钮，真棒！</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230811120936image_18.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230844402478image_thumb_8.png" border="0" height="255" width="644" /></a></p>
 <p><a href="http://www.filamentgroup.com/lab/styling_buttons_and_toolbars_with_the_jquery_ui_css_framework/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://www.filamentgroup.com/lab/styling_buttons_and_toolbars_with_the_jquery_ui_css_framework/" target="_blank">在线示例</a></p>
 <h4><a href="http://www.hongkiat.com/blog/simple-call-to-action-button-with-css-jquery/">Simple "Call To Action" Button With CSS &amp; jQuery</a></h4>
   <p>这个<a href="http://www.itivy.com/jquery" target="_blank">jquery按钮</a>也是简单的鼠标移过特效，个人觉得还挺大气的。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230863445495image_20.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230883004864image_thumb_9.png" border="0" height="255" width="644" /></a></p>
 <p><a href="http://www.hongkiat.com/blog/simple-call-to-action-button-with-css-jquery/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://media02.hongkiat.com/call2action_button_tuts/demo/index.html" target="_blank">在线示例</a></p>
 <h4><a href="http://www.queness.com/post/3157/create-a-simple-interactive-css-button">Create a Simple Interactive CSS Button with jQuery</a></h4>
 <p>这个jquery按钮则是专为提交表但设计的，用Ajax提交的时候按钮出现一张waiting的gif图片，由此可见，这个按钮是重写过的，不信你自己看看。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230891877434image_22.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230901238153image_thumb_10.png" border="0" height="189" width="644" /></a></p>
 <p><a href="http://www.queness.com/post/3157/create-a-simple-interactive-css-button" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://www.queness.com/resources/html/button/index.html" target="_blank">在线示例</a></p>
 <h4><a href="http://greg-j.com/2008/07/21/hover-fading-transition-with-jquery/">Button Hover Fading Transition with jQuery</a></h4>
 <p>这个按钮其实也是一个鼠标滑过特效啦，在“ON”和“OFF”之间切换。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230916684488image_24.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230930976332image_thumb_11.png" border="0" height="194" width="644" /></a></p>
  <p><a href="http://greg-j.com/2008/07/21/hover-fading-transition-with-jquery/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://greg-j.com/static-content/hover-fade.html" target="_blank">在线示例</a></p>
 <h4><a href="http://isthatclear.com/jquery/cursorHover/">Cursor Hover Plugin</a></h4>
 <p>一个简单的jquery鼠标滑过渐变按钮，不多说，自己看。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230941391383image_26.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230948992972image_thumb_12.png" border="0" height="178" width="644" /></a></p>
 <p><a href="http://isthatclear.com/jquery/cursorHover/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://isthatclear.com/jquery/cursorHover/" target="_blank">在线示例</a></p>
 <h4><a href="http://benalman.com/projects/jquery-hashchange-plugin/">jQuery hashchange event</a></h4>
 <p>这也是一个非常基本的jquery按钮，你可以自己定义一些颜色，其实个人觉得，只要颜色搭配好，即使简单的按钮也能炫目多彩。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230960041658image_28.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230972763350image_thumb_13.png" border="0" height="178" width="644" /></a></p>
 <p><a href="http://benalman.com/projects/jquery-hashchange-plugin/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/#test4" target="_blank">在线示例</a></p>
 <h4><a href="http://tympanus.net/codrops/2010/02/08/awesome-css3-jquery-slide-out-button/">Awesome CSS3 &amp; jQuery Slide Out Button</a></h4>
 <p>这个jquery按钮也非常有特点，鼠标移上去，按钮立即展开，非常帅气。</p>
 <p><a href="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230984419616image_30.png"><img style="background-image:none;border:0px none;padding-left:0px;padding-right:0px;display:inline;padding-top:0px;" title="image" alt="image" src="http://www.itivy.com/Upload/EditorImage/image/jquery/201201/634613230993055589image_thumb_14.png" border="0" height="170" width="644" /></a></p>
 <p><a href="http://tympanus.net/codrops/2010/02/08/awesome-css3-jquery-slide-out-button/" target="_blank">查看教程</a>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; <a href="http://www.tympanus.net/Tutorials/SlideOutButton/" target="_blank">在线示例</a></p>
 <p>好了，上面的这些jquery css按钮就介绍完了，是否有你喜欢的呢？请告诉我，我期待我的发现得到你的肯定。</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/12/6/jquery-mobile-json.html]]></link>
<title><![CDATA[利用jQuery Mobile和JSON建立移动应用程序]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Tue, 06 Dec 2011 00:16:50 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>近来移动应用开发迅速受到很多公司的关注，他们寻求为现存的产品和应用程序添加移动展现或者“触点”。即便不是所有，大部分移动应用开发框架也都会适应某种现存的“桌面”开发平台。基于Web的框架则不同。业界当前采用jQuery来创建移动web应用程序.</p>
<p>在移动领域，除了对设备特定属性的支持之外，最主要的一个问题就是程序的大小，正如Aaron Quint所说：</p>
<table style="border:1px dotted #cccccc;table-layout:fixed;" class="ke-zeroborder" align="center" border="0" cellpadding="6" cellspacing="0" width="95%">
    <tbody>
        <tr>
            <td style="word-wrap:break-word;" bgcolor="#fdfddf"><span style="color:#ff0000;">&nbsp;压缩后的jQuery也大概有40-50K，可能还会稍微多一些，此外，如果你想要jQuery  UI和一些动画功能，那么就还需要100K。对于移动设备来说，可能没有那么多空间。</span></td>
        </tr>
    </tbody>
</table>
<p>JQM Alpha 3现在已经精简到17K，其中还有相关的CSS文件。</p>
<p>Enrique Ortiz还发现了JQM的其他优势：</p>
<p>◆总体上的简单性： 你可以主要使用标签驱动的方式开发页面，那样，你只需要使用很少或者不使用JavaScript。</p>
<p>◆进一步改善和得体的降格： jQuery  Mobile哲学是要同时支持高端和性能较差的设备，包括那些不支持JavaScript的设备，并且还要尽可能提供最佳体验。</p>
<p>◆可访问性： jQuery已经支持可访问的富Internet应用程序(WAI-ARIA)，以有助于使用辅助技术让有残疾的访问者也能够访问网页。</p>
<p>◆小文件</p>
<p>◆主题</p>
<p>安装JQM很简单，只需要添加一个样式表文件和三个JavaScript文件：</p>
<p></p>
<pre class="brush:xhtml;">&lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1 /jquery.mobile-1.0a1.min.css" /&gt;  
&lt;script src="http://code.jquery.com/jquery-1.4.3.min.js"&gt;&lt;/script&gt;  
&lt;script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"&gt; &lt;/script&gt;  
&lt;script src="http://jquery.ibm.navitend.com/utils.js"&gt;&lt;/script&gt; </pre><p></p>
<p>此外，Frank还提到，在移动领域JQM的关键优势就在于，它能够使用AJAX让用户界面更平滑：</p>
<table style="border:1px dotted #cccccc;table-layout:fixed;" class="ke-zeroborder" align="center" border="0" cellpadding="6" cellspacing="0" width="95%">
    <tbody>
        <tr>
            <td style="word-wrap:break-word;" bgcolor="#fdfddf"><span style="color:#ff0000;">&nbsp;JQM把Ajax提升了一个层次，这是通过拦截页面请求，并在大多数情况下把这些请求转化为指定的Ajax调用达到的。最基本的结果是，当用户访问使用JQM构建的web应用程序时，只会修改页面的DOM结构，而不是每次都替换所有页面。</span></td>
        </tr>
    </tbody>
</table>
<p>这种效果是通过使用HTML5的data-*属性达到的。在HTML5中，任何带有data-前缀的属性本质上都会被验证解析器忽略，而应用程序可以任意地拦截那些属性。JQM依赖于data-role属性把它的核心功能组合成字符串。</p>
<table style="border:1px dotted #cccccc;table-layout:fixed;" class="ke-zeroborder" align="center" border="0" cellpadding="6" cellspacing="0" width="95%">
    <tbody>
        <tr>
            <td style="word-wrap:break-word;" bgcolor="#fdfddf">&nbsp; <span style="color:#ff0000;">当JQM应用程序从一个页面切换到下一个页面时，发生的主要动作就是内容div中的内容会换成新页面的内容。</span></td>
        </tr>
    </tbody>
</table>
<p>我们可以使用data-rel属性请求窗口如何显示，当它显示出来的时候，data-transition属性会告诉JQM做出相应的转换。我们可
以使用data-filter属性来指定data-role列表的行为，而该列表可以基于输入的关键字来过滤列表的值。Frank还说明了如何创建自定义
的data-*属性，从而实现应用程序的特殊属性。</p>
<p>JQM会在今年上半年发布。Frank最后做出结论：</p>
<table style="border:1px dotted #cccccc;table-layout:fixed;" class="ke-zeroborder" align="center" border="0" cellpadding="6" cellspacing="0" width="95%">
    <tbody>
        <tr>
            <td style="word-wrap:break-word;" bgcolor="#fdfddf">&nbsp; <span style="color:#ff0000;">随着时间的推移，我们期望它能够整合到像PhoneGap之类的框架中，并且可能会整合到像Appcelerator的Titanium等开发环境中。</span></td>
        </tr>
    </tbody>
</table>
<p>你认为基于Web的移动应用程序有前途吗?  这只是框架和开发是否简单的问题，还是移动应用程序非常特殊(因为用户会使用自己的客户端，并期望获得最好的用户体验和安全性)以致于基于Web的应用程序只会成为新平台上的边缘程序。</p>
<p>查看英文原文：<a target="_blank" href="http://www.infoq.com/news/2011/03/jquery-json-mobile-apps" rel="nofollow">Using JQuery Mobile and JSON to Create Mobile Applications</a></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/29/jquery-image-player.html]]></link>
<title><![CDATA[分享一个Jquery封装幻灯片效果]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Tue, 29 Nov 2011 23:31:16 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>前几天 在我同事博客里面看到一篇幻灯片 所以觉得用Jqeury写幻灯片也并不是很难 就是和我在博客里面的tab自动切换的原理是一模一样的 
只是形式不同而已！所以今天也写了一个常见的幻灯片效果 用Jquery写的&nbsp; 很简单 也是用我上次tab自动切换的js&nbsp; 所以原理没有什么可说的 
不懂的可以看看上次写的TAB自动切换代码：下面的一张截图：</p>
<p><img src="/Upload/EditorImage/image/jquery/201111/20111129232542_9642.jpg" alt="" border="0" /></p>
<p>就是类似这种幻灯片：</p>
<p>下面是HTML结构和CSS样式</p>
<p></p>
<pre class="brush:xhtml;">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; 
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; 
&lt;head&gt; 
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; 
&lt;title&gt;无标题文档&lt;/title&gt; 
&lt;style&gt; 
.Marquee{ width:490px; margin:50px auto 0; overflow:hidden;}  
body,div,ul,li{ margin:0; padding:0;}  
ul,li{ list-style:none;}  
img{ display:block; border:none;}  
.content-main{ width:490px; height:170px; overflow:hidden;}  
.content{ width:490px; height:170px; overflow:hidden;}  
.hide{ display:none;}  
.menu{ width:490px; height:22px; overflow:hidden; background:#966;}  
.menu li{ width:160px; height:22px; overflow:hidden; float:left; line-height:22px; text-align:center;}  
.menu li.last-col{ width:170px; height:22px; overflow:hidden;}  
.current{ background: #F00;}  
.content a{ width:490px; height:170px; overflow:hidden; display:block;}  
&lt;/style&gt; 
&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"&gt;&lt;/script&gt;   
&lt;script src="autoTab.js"&gt;&lt;/script&gt; 
&lt;/head&gt; 
 
&lt;body&gt; 
    &lt;div id="Marquee" class="Marquee"&gt;   
        &lt;div class="content-main"&gt; 
            &lt;div class="content"&gt;&lt;a href="#" target="_blank"&gt;&lt;img  src="images/1.jpg"/&gt;&lt;/a&gt;&lt;/div&gt; 
            &lt;div class="content hide"&gt;&lt;a href="#" target="_blank"&gt;&lt;img  src="images/2.jpg"/&gt;&lt;/a&gt;&lt;/div&gt; 
            &lt;div class="content hide"&gt;&lt;a href="#" target="_blank"&gt;&lt;img  src="images/3.jpg"/&gt;&lt;/a&gt;&lt;/div&gt; 
        &lt;/div&gt; 
        &lt;ul class="menu"&gt; 
            &lt;li class="current"&gt;tab1&lt;/li&gt; 
            &lt;li&gt;tab2&lt;/li&gt; 
            &lt;li class="last-col"&gt;tab3&lt;/li&gt; 
        &lt;/ul&gt; 
    &lt;/div&gt;   
    &lt;script type="text/javascript"&gt; 
        new tabMarquee("#Marquee",3);  
    &lt;/script&gt; 
&lt;/body&gt; 
&lt;/html&gt; </pre>JS代码如下:<p></p>
<p></p>
<pre class="brush:js;">// JavaScript Document  
 
function tabMarquee(obj,count){  
    _this = this;  
    _this.obj = obj;  
    _this.count = count;  
    _this.time = 3000;  //停留的时间  
    _this.n = 0;  
    var t;  
    this.slider = function(){  
        $(_this.obj + " .menu li").bind("mouseover",function(event){  
            $(event.target).addClass("current").siblings().removeClass("current");  
            var index = $(_this.obj + " .menu li").index(this);  
            $(_this.obj + " .content-main .content").eq(index).show().siblings().hide();  
            _this.n = index;      
        })  
    }  
      
    this.addHover = function(){  
        $(_this.obj).hover(function(){  
            clearInterval(t);     
        },function(){  
            t = setInterval(_this.autoPlay,_this.time);   
        })    
    }  
    this.autoPlay = function(){  
        _this.n = _this.n &gt;=(_this.count-1) ? 0 : ++_this.n;  
        $(_this.obj + " .menu li").eq(_this.n).trigger("mouseover");      
    }  
    this.factory = function(){  
        this.slider();  
        this.addHover();  
        t = setInterval(this.autoPlay,_this.time);    
    }  
    this.factory();  
}</pre>下面传个附件 看不懂可以下载下来先看看效果 然后稍微理解下 就ok了！其实说真的js重要&nbsp; 但是HTML结构和CSS样式同样重要 有时结构写好的话 css写好的话 js就很简单！！<p></p>
<p><a target="_blank" href="http://www.itivy.com/DownloadFile.ashx?id=634582061866272461">源代码下载</a></p>
<p>原文链接：http://tugenhua.blog.51cto.com/3912301/726649</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/15/jquery-cross-domain-ajax.html]]></link>
<title><![CDATA[用jquery实现ajax跨域请求]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Tue, 15 Nov 2011 12:45:34 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[业务需求：一台独立的新闻服务器（A），对外提供新闻。 客户（B）网页引入A的js，即可请求新闻。<br />
<p>
B请求新闻所产生的页面有A的js生成。</p>
<p>
A提供&lt;script type="text/javascript" src="http://newsdomain/js/news.js" &gt; &lt;/script&gt; 来让B 引入。</p>
一般的ajax无法跨域请求，jquery的 $.ajax 
也是如此。均提示访问被拒绝。这是由于浏览器对javascript的安全机制造成的。请求时 
服务器可以得到响应并生成数据，但无法跨域返回给B。查了很多资料，Jquery的jsonp可以实现跨域请求和响应。但是网上的写法各不相同，甚至不全
面，经过多番研究得以实现。我将客户端的写法和服务端的写法写出来，与各位同仁一起分享。<br />
<p>
首先js的写法。news.js中</p>
<p></p>
<pre class="brush:js;">function requestNews(page,key,from,to,sort,language){
$.getJSON("http://"+domain+"/requestNews/getNews?mehtod=splitPage&amp;page="+page+"&amp;key="+k+"&amp;from="+from+"&amp;to="+to+"&amp;sort="+sort+"&amp;language="+language+"&amp;jsonpcallback=?",null,function call(json){
alert(json.info);
});
}</pre>大家有发现这个url有些特别http://******?参数=值jsonpcallback=? 
。这种写法是jsonp的写法。jquery就是通过jsonpcallback=? 这个参数找到回调函数function call(json) 
的。所以请求中必须加jsonpcallback=?。<br />
在服务器端会接收jsonpcallback这个值。jquery会把那个？做处理，jsonpcallback=jsonp1287199309053。<br />
$.getJSON这个函数的的参数写法你可以去查一下。$.getJSON（地址，数据，回调函数）<br />
由于我的数据已经与url合并，所以我的第二个参数为null，不写也可。<br />
下面说服务器端对请求的数据如何处理和返回。重点只有两个。<br />
1，json数据格式。2，为了让回调函数可以接受返回值，其写法特被。<br />
第一json数据格式{name：value}.详细的自己去查。<br />
第二。服务端一定要接收jsonpcallback=?<br />
<pre class="brush:java;">String callBack = req.getParameter("jsonpcallback");
String  strJson = {"info":"aaaa"};
String result = callBack (strJson);// 这里很重要。</pre> 打印出来的结果就是<br />
jsonp1287199543662({"info":"aaaa"}) //这里要看清楚。<br />
<br />
重点讲完了，最后一点就是返回<br />
<pre class="brush:java;">resp.setContentType("application/json;charset=UTF-8"); //这里的格式是json
resp.setHeader("Cache-Control","no-cache");
PrintWriter out = resp.getWriter();
out.print(callBack); // 这是是print 不是write。
out.close();</pre> 这样就实现了ajax跨域访问。 很多事情做出来的时候再回想感觉特简单，当你摸索的过程中却云里雾里 也很烦恼，尤其在网上查到的各种方法都无效的时候 ，烦。 其实就这么简单。<p></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/9/jquery-keyboard-event.html]]></link>
<title><![CDATA[深入了解jquery键盘事件]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Wed, 09 Nov 2011 10:53:25 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>很多时候，我们需要获取用户的键盘事件，下面就一起来看看jquery是如何操作键盘事件的。</p>
<p><strong>一、首先需要知道的是：</strong> </p>
<p><strong>1</strong><strong>、keydown()</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; keydown事件会在键盘按下时触发.</p>
<p><strong>2</strong><strong>、keyup()</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; keyup事件会在按键释放时触发,也就是你按下键盘起来后的事件</p>
<p><strong>3</strong><strong>、keypress()</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; keypress事件会在敲击按键时触发,我们可以理解为按下并抬起同一个按键</p>
<p><strong>二、获得键盘上对应的ascII码：</strong></p>
<p></p>
<pre class="brush:js;">      $(document).keydown(function(event){ 
              console.log(event.keyCode); 
      });</pre><strong>$tips</strong>:&nbsp;上面例子中,event.keyCode就可以帮助我们获取到我们按下了键盘上的什么按键,他返回的是ascII码,比如说上下左右键,分别是38,40,37,39；<p></p>
<p><strong>三、实例（当按下键盘上的左右方面键时）</strong></p>
<p></p>
<pre class="brush:js;">      $(document).keydown(function(event){

          //判断当event.keyCode 为37时（即左方面键），执行函数to_left();

          //判断当event.keyCode 为39时（即右方面键），执行函数to_right();

          if(event.keyCode == 37){

             //do something;
          }else if (event.keyCode == 39){ 
             //do something;
          } 
      });</pre><p></p>
<span style="font-weight:bold;">实例研究：</span><p>比如：小说网站中常见的按左右键来实现上一篇文章和下一篇文章；按ctrl+回车实现表单提交；google reader和有道阅读中的全快捷键操作...（以此提高用户体验）</p>
<p>&nbsp;</p>
<p><strong>① 实现ctrl+Enter就是ctrl+回车提交表单：</strong></p>
<p></p>
<pre class="brush:js;">$(document).keypress(function(event) {

      if (event.ctrlKey &amp;&amp; event.which == 13)

     $("form:first").trigger("submit");

 })</pre><strong>② 监测ctrl按键：</strong><p></p>
<p></p>
<pre class="brush:js;">$(document).keydown(function(event){

       //（ctrlKey和metaKey等效：都是监测）按下ctrl返回turn，按下非ctrl键返回false；

       console.log(event.ctrlKey);

       //console.log(event.metaKey);          

})</pre><strong>③ 键盘系列操作</strong><p></p>
<p></p>
<pre class="brush:js;">$(document).keydown(function(event){  

    var e = event || window.event;     //作用？？？

    var k = e.keyCode || e.which;  //获取按键的acdII 码

    switch(k) {

       case 37:

           //…

           break;

       case 39:

           //…

           break;

    }

    return false;

})</pre><pre class="brush:js;">       //另外发现一个应用的方法：当页面转载完成的时候，第一个表单元素获得焦点，以便输入

       $("input[type=text]:first").trigger("focus");     

       //当表单没获得焦点，但用户却按下键盘的时候，自动为用户定位焦点到输入框上

       $(document).keydown(function(){

              $("input[type=text]:first").trigger("focus");

       })</pre>以上是列出了jquery键盘事件的常用方法，很多时候应该也够用了。<p></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/8/jquery-3d-text-plugin.html]]></link>
<title><![CDATA[jquery 3d文字插件介绍]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Tue, 08 Nov 2011 10:28:54 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>上一篇我们介绍了一款<a target="_blank" href="http://www.itivy.com/jquery/archive/2011/11/7/jquery-text-shadow-plugin.html">基于jquery的文字阴影插件</a>，有了它的渲染，我们的文字变得十分动感。这回，我再来给大家介绍一个实现3d文字效果的jquery插件，相比于投影效果，3d的文字更让人觉得富有美感，当然，说句题外话，本人并不喜欢如此花俏的东西，但鉴于有很多人确实需要这个效果，我还是把这个jquery 3d文字插件分享出来。</p>
<p>该jquery 3d文字插件的代码如下，使用时可以把该代码直接引入到页面上或者放入单独的JS文件中然后引入到页面中：</p>
<pre class="brush:js;">(function($){

	$.fn.textDepth = function(ops){
		var defaultOptions = {
			depth: 3,
			wrapper: "body",
			shade_color: '#c7c7c7',
			gradient: true,
			extra_classes: "",
			direction: "downRight"
		};
		var layers = [];
		
		return this.each(function(){
			var options = $.extend({}, defaultOptions, ops);
			var t = $(this);
			var def_class = "textDepthSuperDuperClass" + t.attr('id');
			
			if(t.css('position') == 'relative' || t.css('position') == 'absolute'){
				if(options.wrapper != null){
				
					if(t.css('z-index') &lt; options.depth || t.css('z-index') == "auto")
						t.css('z-index', (options.depth + 1));
				
					//Remove previous remains:
					$('.' + def_class).remove();
					
					var t_top = parseInt(t.css('top'));
					var t_left = parseInt(t.css('left'));
					var z_index = parseInt(t.css('z-index'));
					var opacity = 1.0;

					for(var i = 0; i &lt; options.depth; i++){
						switch(options.direction){
							case "downRight":
								t_top++;
								t_left++;
								break;
								
							case "downLeft":
								t_top++;
								t_left--;
								break;
								
							case "upRight":
								t_top--;
								t_left++;
								break;
								
							case "upLeft":
								t_top--;
								t_left--;
								break;
								
							case "up":
								t_top--;
								break;
								
							case "left":
								t_left--;
								break;
								
							case "right":
								t_left++;
								break;
								
							case "down":
								t_top++;
								break;
						}
						
						z_index--;
						opacity = 1 - parseFloat((i / options.depth));
						
						var shadeDiv = $(document.createElement('div')).css({'position':'absolute',
																			 'top':t_top,
																			 'left':t_left,
																			 'color':options.shade_color,
																			 'z-index':z_index
																			 })
																	   .addClass(options.extra_classes)
																	   .addClass(def_class)
																	   .html(t.html());
						
						if(options.gradient)
							shadeDiv.css('opacity', opacity);
							
						$(options.wrapper).append(shadeDiv);
					}
				}
			}
		});
	};
})(jQuery);</pre>如何使用该3d文字插件呢？接下来请继续围观，认真点，呵呵。<p></p>
<p></p>
<pre class="brush:js;">$('.foo').textDepth({
   wrapper: "body",
   shade_color: "#6f6f6f",
   depth: 7,
   direction: "downRight",
   extra_classes: "sidebarText"
});</pre>怎么样，这个应该看得懂吧，不懂，好吧，我来解释一下：<p></p>
<p>$(".foo")即为class是foo的文字渲染3d效果；</p>
<p>wrapper：即一个范围，在这个范围中，class为foo的文字会被渲染；</p>
<p>shade_color：也就是投影的颜色啦；</p>
<p>depth：投影的深度；</p>
<p>direction：投影方向，有如下几种选择：downRight、downLeft、upRight、upLeft、up、left、right、down；</p>
<p>extra_classes：为文字额外附加的class，多个的话用空格隔开。</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/7/jquery-image-zoomer.html]]></link>
<title><![CDATA[jQuery实现页面图片等比例放大和缩小]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Mon, 07 Nov 2011 21:35:21 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>本文将利用jquery实现页面图片等比例放大和缩小。说明: 页面中经常需要将未知大小的图片展示在有限的空间里,&nbsp;如果直接指定图片的width和height值, 就有可能造成图片走样,&nbsp;这段代码就是为解决这个问题设计。</p>
<p>html代码结构:</p>
<p></p>
<pre class="brush:xhtml;">&lt;a href=""&gt;&lt;img src="images/tmp_376x470.jpg" width="300" height="300" alt=""/&gt;&lt;/a&gt;
&lt;a href=""&gt;&lt;img src="images/tmp_409x265.jpg" width="300" height="300" alt=""/&gt;&lt;/a&gt;
&lt;a href=""&gt;&lt;img src="images/tmp_572x367.jpg" width="300" height="300" alt=""/&gt;&lt;/a&gt;</pre>样式:<p></p>
<p></p>
<pre class="brush:css;">a{width:300px;height:300px;background:#fff;border:1px solid #666;display:inline-block} /* 这里需要指定a标签的高宽,背景和边框为可选 */  </pre>脚本(jquery可自行添加):<p></p>
<p></p>
<pre class="brush:js;">$(function () {
	var imgs = $('a&gt;img');
	imgs.each(function () {
		var img = $(this);
		var width = img.attr('width');//区域宽度
		var height = img.attr('height');//区域高度
		var showWidth = width;//最终显示宽度
		var showHeight = height;//最终显示高度
		var ratio = width / height;//宽高比
		img.load(function () {
			var imgWidth, imgHeight, imgratio;
			$('&lt;img /&gt;').attr('src', img.attr('src')).load(function () {
				imgWidth = this.width;//图片实际宽度
				imgHeight = this.height;//图片实际高度
				imgRatio = imgWidth / imgHeight;//实际宽高比
				if (ratio &gt; imgRatio) {
					showWidth = height * imgRatio;//调整宽度太小
					img.attr('width', showWidth).css('margin-left', (width - showWidth) / 2);
				} else {
					showHeight = width / imgRatio;//调高度太小
					img.attr('height', showHeight).css('margin-top', (height - showHeight) / 2);
				}
			});
		});
	});
});</pre>这样就是实现了图片的等比例放大缩小了。<p></p>
<p>原文链接：http://blog.csdn.net/yorts52/article/details/6938359</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/7/jquery-text-shadow-plugin.html]]></link>
<title><![CDATA[介绍一个jquery文字阴影插件CSS-3 Text-Shadow]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Mon, 07 Nov 2011 14:04:43 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>之前在<a target="_blank" href="http://www.itivy.com/ivy">王国峰的博客</a>中，有一篇文章是分享基于jquery的各种文字特效的文章，名叫《<a target="_blank" href="http://www.itivy.com/ivy/archive/2011/8/15/the-16-jquery-text-effect.html">16个金典的jquery文字特效</a>》,那里有几个特效还是挺好的，有兴趣可以去看看。但我觉得用的最多的jquery文字阴影特效貌似提得不多，很多时候我们需要对文字做一些阴影特效，当然，在firefox和chrome中我们可以非常方便的设置文字阴影，但IE就要用CSS滤镜了，然而为了统一方便的实现文字阴影特效，我们索性用jquery来实现这一效果，省的要为不同浏览器写不同的CSS代码，很烦。</p>
<p>好吧，说到这里，就请出今天的主角吧，他是一款比较轻量级的jquery文字投影插件叫CSS-3 Text-Shadow，使用之前先来看看几张效果图吧。</p>
<p><img src="/Upload/EditorImage/image/jquery/201111/20111106221856_4735.jpg" alt="" border="0" /></p>
<p><img style="width:602px;height:246px;" src="/Upload/EditorImage/image/jquery/201111/20111106221946_3633.jpg" alt="" border="0" /></p>
<p>该项目的主页地址：<a target="_blank" href="http://www.hintzmann.dk/testcenter/js/jquery/textshadow/">http://www.hintzmann.dk/testcenter/js/jquery/textshadow/</a></p>
<p>下面我简单介绍下这个文字阴影插件的使用方法吧。</p>
<p>1、当然先要在页面上引入jquery主库和<a href="http://www.hintzmann.dk/testcenter/js/jquery/textshadow/jquery.textshadow.js">jquery.textshadow.js</a> 脚本库，具体就不讲了，你懂的。</p>
<p>2、为你要实现阴影效果的文字加上CSS属性，如要为H1文字加阴影特效，那么CSS代码如下：</p>
<p></p>
<pre class="brush:css;">h1 { 
  text-shadow: 2px 2px 2px #999; 
}</pre>当然，这个属性IE是不支持的，但是别担心，下面就可以用这个插件来实现了<p></p>
<p>3、调用textShadow()来实现上面定义的阴影CSS，注意，这个需要在DOM加载完成才可以调用，代码如下：</p>
<p></p>
<pre class="brush:js;">$(document).ready(function(){
  $("h1").textShadow();
})</pre>当然，你也可以定义一个options参数来重载第2步定义的阴影CSS参数，然后在调用textShadow的时候把options参数传递进去，代码如下：<br />
<pre class="brush:js;">var option = {
  x:      1, 
  y:      2, 
  radius: 3,
  color:  "#ccff00"
}

$("h1").textShadow( option );</pre>如果要移除文字的阴影效果，可以调用textShadowRemove()来实现。<p></p>
<p>是吧，很简单，短短的几行代码就可以帮助你实现兼容各种版本浏览器的jquery文字阴影效果，如果你喜欢，可以把本文分享给你的同事或者朋友，帮助他们简化繁琐的开发。</p>
<p>如果你要转载，也可以，不过请注明<a target="_blank" href="http://www.itivy.com/jquery">出处</a>和原文链接，谢谢合作！</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/6/jquery-news-ticker-usage.html]]></link>
<title><![CDATA[基于jquery的即时新闻展示插件jQuery News Ticker使用介绍]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Sun, 06 Nov 2011 00:25:23 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>有时候我们为了节省页面空间，会在页面明显处放一小条，用来展示比较重要的即时新闻，一般以轮播的形式出现。今天要介绍的jQuery News Ticker插件就是用来实现这个即时新闻展示功能的，效果图如下：</p>
<p><img style="width:706px;height:159px;" src="/Upload/EditorImage/image/jquery/201111/20111106001719_5954.jpg" alt="" border="0" /></p>
<p>jQuery&nbsp;news ticker是一个使用非常便捷的jQuery插件，能够非常方便地让你生成类似上图所示的一个新闻行情效果。<a target="_blank" href="http://www.gbin1.com/technology/jquerynews/20111105jquerypluginnewsticker/demo.html">插件的demo演示</a></p>
<p>它能够通过列表，HTML甚至是RSS（只能加载本站的RSS feed）来生成新闻内容，并且支持前后播放和停止。这个插件支持一系列的自定义选项，例如：</p>
<ul><li>播放速度</li>
<li>播放效果</li>
<li>播放方向</li>
<li>显示时间</li>
</ul>
首先引入jQuery news ticker类库及其jQuery类库：<br />
<pre class="brush:xhtml;">&lt;link href="css/ticker-style.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="jquery.ticker.js" type="text/javascript"&gt;&lt;/script&gt;</pre>html代码如下：<br />
<pre class="brush:xhtml;">&lt;div id="ticker-wrapper" class="no-js"&gt;
    &lt;ul id="js-news" class="js-hidden"&gt;
        &lt;li class="news-item"&gt;&lt;a href="#"&gt;This is the 1st latest news item.&lt;/a&gt;&lt;/li&gt;
        &lt;li class="news-item"&gt;&lt;a href="#"&gt;This is the 2nd latest news item.&lt;/a&gt;&lt;/li&gt;
        &lt;li class="news-item"&gt;&lt;a href="#"&gt;This is the 3rd latest news item.&lt;/a&gt;&lt;/li&gt;
        &lt;li class="news-item"&gt;&lt;a href="#"&gt;This is the 4th latest news item.&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;</pre>调用jquery news ticker的js代码如下：<br />
<pre class="brush:js;">&lt;script type="text/javascript"&gt;
    $(function () {
        $('#js-news').ticker();
    });
&lt;/script&gt;</pre>好了，这个jquery新闻展示插件jquery news ticker就介绍到这里了，其实也挺简单的，基本上稍微翻译了一下。<br />]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/5/share-some-jquery-image-effects.html]]></link>
<title><![CDATA[分享几个非常漂亮的jquery图片特效插件]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Sat, 05 Nov 2011 11:08:54 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>利用jquery强大而灵活的脚本库，我们可以对图片作很多的特效处理，如图片切换播放、淡入淡出等特效。一般这些jquery图片特效都能很好的吸引用户的眼球，让人觉得页面非常美观和大气。那么，今天你来到这里，我相信你一定是抱着寻找的心情来的，好吧，下面这些<a target="_blank" href="http://www.itivy.com/jquery/search?keyword=jquery 图片特效">jquery图片特效</a>就献给你了，很高兴你能笑纳。</p>
<p>1、<a href="http://www.slidesjs.com/" target="_blank">Slides</a></p>
<p>这是一个比较流畅的jquery图片播放插件，颇有iphone图片特效的感觉</p>
<p><img src="/Upload/EditorImage/image/jquery/201111/20111105104421_0667.jpg" alt="" border="0" /></p>
<p>2、<a href="http://facedetection.jaysalvat.com/" target="_blank">Face Detection</a></p>
<p>这个一看插件名称就知道这个特效是干嘛了吧，是的，这个jquery图片特效插件正式用来圈人脸的，非常给力哦。</p>
<p><img src="/Upload/EditorImage/image/jquery/201111/20111105104615_9006.jpg" alt="" border="0" /></p>
<p>3、<a href="http://aviathemes.com/aviaslider/" target="_blank">AviaSlider</a></p>
<p>这亦是一个<a target="_blank" href="http://www.itivy.com/jquery/search?keyword=jquery%e5%9b%be%e7%89%87%e6%92%ad%e6%94%be">jquery图片播</a>放插件，与第一个不同的是，这个在切换播放的时候可以加上切换特效，非常炫。</p>
<p><img src="/Upload/EditorImage/image/jquery/201111/20111105105031_8079.jpg" alt="" border="0" /></p>
<p>4、<a href="http://nanotux.com/blog/fullscreen/" target="_blank">Fullscreenr</a></p>
<p>顾名思义，这个<a target="_blank" href="http://www.itivy.com/jquery/search?keyword=jquery 图片特效">jquery图片特效</a>插件是用来图片全屏显示用的，有时候我们正在苦恼如何让网页背景图全屏显示，于是，这个插件就能帮上你了，很酷吧。</p>
<p><img src="/Upload/EditorImage/image/jquery/201111/20111105105210_1210.jpg" alt="" border="0" /></p>
<p>5、<a href="http://playground.mobily.pl/jquery/mobily-notes.html" target="_blank">MobilyNotes</a></p>
<p>这个图片播放插件与其他的又有点不太一样，图片切换时仿佛是从底部一张张抽取出来一样，别有一番风味。</p>
<p><img src="/Upload/EditorImage/image/jquery/201111/20111105105538_2758.jpg" alt="" border="0" /></p>
<p>6、<a target="_blank" href="http://www.sohtanaka.com/web-design/fancy-thumbnail-hover-effect-w-jquery/">Fancy Thumbnail Hover Effect w/ jQuery</a></p>
<p>这是一个基于jquery的鼠标滑过特效，当你把鼠标滑过时缩略图就能放大，这个图片特效有点像google图片搜索中的图片浏览形式。</p>
<p><img style="width:559px;height:244px;" src="/Upload/EditorImage/image/jquery/201111/20111105110049_0337.jpg" alt="" border="0" /></p>
<p>好了，我个人觉得这6个jquery图片特效非常诱人，于是便拿出来分享了，当然以上有些jquery图片特效你可能已经看到过了，那恭喜你，你是一个见多识广的web前端开发狂人，本人自惭形秽。最后，希望上面的这几个jquery图片特效能帮到有需要的朋友。</p>
<p>再最后，本文欢迎转载，但请注明出处：<a target="_blank" href="http://www.itivy.com/jquery">jquery资源宝库</a>&nbsp;&nbsp;&nbsp; 并在文章明显处注明原文链接，否则，你懂的。</p>
<p>再再最后，推荐几个你可能还会比较感兴趣的文章：</p>
<p><a target="_blank" href="../jquery/archive/2011/6/21/jquery-picture-player-cloud-carousel.html">一款很炫的jquery图片播放插件Cloud Carousel</a></p>
<p><a target="_blank" href="../jquery/archive/2011/6/21/jquery-desktop-image-view.html">jquery和css3打造桌面式图片浏览插件</a></p>
<p><a target="_blank" href="../jquery/archive/2011/6/22/jquery-image-slideshow-like-apple.html">一款仿苹果样式的jquery图片播放插件【附源码】</a></p>
<p><a target="_blank" href="../jquery/archive/2011/6/26/jquery-image-player-plugin-yoxview.html">一款基于jquery的媒体和图片浏览插件YoxView</a></p>
<p>再再再最后，在欢笑中结束本文，谢谢阅读！</p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/11/3/jquery-json.html]]></link>
<title><![CDATA[jquery json解析详解]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Thu, 03 Nov 2011 12:22:32 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p><span style="font-family:Microsoft YaHei;font-size:13px;">我们先以解析上例中的comments对象的JSON数据为例，然后再小结jQuery中解析JSON数据的方法。</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">上例中得到的JSON数据如下，是一个嵌套JSON：</span></p>
<p></p>
<pre class="brush:js;">{"comments":[{"content":"很不错嘛","id":1,"nickname":"纳尼"},{"content":"哟西哟西","id":2,"nickname":"小强"}]}</pre><p></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">获取JSON数据，在jQuery中有一个简单的方法 $.getJSON() 可以实现。</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">下面引用的是官方API对$.getJSON()的说明：</span></p>
<h4 class="name"><span style="font-family:Microsoft YaHei;font-size:13px;">jQuery.getJSON( url, [data,] [success(data, textStatus, jqXHR)] )</span></h4>
<p class="arguement"><span style="font-size:13px;"><span style="font-family:Microsoft YaHei;"><strong>url</strong>A string containing the URL to which the request is sent.</span></span></p>
<p class="arguement"><span style="font-size:13px;"><span style="font-family:Microsoft YaHei;"><strong>data</strong>A map or string that is sent to the server with the request.</span></span></p>
<p class="arguement"><span style="font-size:13px;"><span style="font-family:Microsoft YaHei;"><strong>success(data, textStatus, jqXHR)</strong>A callback function that is executed if the request succeeds.</span></span></p>
<p class="arguement"><span style="font-family:Microsoft YaHei;font-size:13px;">回调函数中接受三个参数，第一个书返回的数据，第二个是状态，第三个是jQuery的XMLHttpRequest，我们只使用到第一个参数。</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">$.each()是用来在回调函数中解析JSON数据的方法，下面是官方文档：</span></p>
<h4 class="name"><span style="font-family:Microsoft YaHei;font-size:13px;">jQuery.each( collection, callback(indexInArray, valueOfElement) )</span></h4>
<p class="arguement"><span style="font-size:13px;"><span style="font-family:Microsoft YaHei;"><strong>collection</strong>The object or array to iterate over.</span></span></p>
<p class="arguement"><span style="font-size:13px;"><span style="font-family:Microsoft YaHei;"><strong>callback(indexInArray, valueOfElement)</strong>The function that will be executed on every object.</span></span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">$.each()方法接
受两个参数，第一个是需要遍历的对象集合（JSON对象集合），第二个是用来遍历的方法，这个方法又接受两个参数，第一个是遍历的index，第二个是当
前遍历的值。哈哈，有了$.each()方法JSON的解析就迎刃而解咯。(*^__^*) 嘻嘻……</span></p>
<p></p>
<pre class="brush:js;">function loadInfo() {
    $.getJSON("loadInfo", function(data) {
        $("#info").html("");//清空info内容         $.each(data.comments, function(i, item) {
            $("#info").append(
                    "&lt;div&gt;" + item.id + "&lt;/div&gt;" + 
                    "&lt;div&gt;" + item.nickname    + "&lt;/div&gt;" +                     "&lt;div&gt;" + item.content + "&lt;/div&gt;&lt;hr/&gt;");
        });
        });
}</pre><p></p>
<p></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">正如上
面，loadinfo是请求的地址，function(data){...}就是在请求成功后的回调函数，data封装了返回的JSON对象，在下面
的$.each(data.comments,function(i,item){...})方法中data.comments直接到达JSON数据内包
含的JSON数组：</span></p>
<p></p>
<pre class="brush:js;">[{"content":"很不错嘛","id":1,"nickname":"纳尼"},{"content":"哟西哟西","id":2,"nickname":"小强"}]</pre><p></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">$.each()方法中的function就是对这个数组进行遍历，再通过操作DOM插入到合适的地方的。在遍历的过程中，我们可以很方便的访问当前遍历index(代码中的”i“)和当前遍历的值(代码中的”item“)。</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">上例的运行结果如下：</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;"><img src="/Upload/EditorImage/20111103121856_5179.jpg" alt="" border="0" /><br />
</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">如果返回的JSON数据比较复杂，则只需多些$.each()进行遍历即可，嘿嘿。例如如下JSON数据：</span></p>
<p></p>
<pre class="brush:js;">{"comments":[{"content":"很不错嘛","id":1,"nickname":"纳尼"},{"content":"哟西哟西","id":2,"nickname":"小强"}],
"content":"你是木头人，哈哈。","infomap":{"性别":"男","职业":"程序员",
"博客":"http:\/\/www.cnblogs.com\/codeplus\/"},"title":"123木头人"}</pre><p></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">js如下：</span></p>
<p></p>
<pre class="brush:js;">function loadInfo() {
    $.getJSON("loadInfo", function(data) {
        $("#title").append(data.title+"&lt;hr/&gt;");
        $("#content").append(data.content+"&lt;hr/&gt;");
        //jquery解析map数据
        $.each(data.infomap,function(key,value){
            $("#mapinfo").append(key+"----"+value+"&lt;br/&gt;&lt;hr/&gt;");
        });
        //解析数组
        $.each(data.comments, function(i, item) {
            $("#info").append(
                    "&lt;div&gt;" + item.id + "&lt;/div&gt;" + 
                    "&lt;div&gt;" + item.nickname    + "&lt;/div&gt;" +
                    "&lt;div&gt;" + item.content + "&lt;/div&gt;&lt;hr/&gt;");
        });
        });
}</pre><p></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">值得注意的是，$.each()遍历Map的时候，function()中的参数是key和value，十分方便。</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;">上例的运行效果：</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;"><img src="/Upload/EditorImage/20111103122037_9198.jpg" alt="" border="0" /><br />
</span></p>
<p><span style="font-family:Microsoft YaHei;font-size:13px;"><a target="_blank" href="http://blog.csdn.net/jpr1990/article/details/6931027">原文链接</a> </span></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/10/31/jquery-event.html]]></link>
<title><![CDATA[jQuery代码优化：基本事件]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Mon, 31 Oct 2011 20:49:41 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>jQuery对事件系统的抽象与优化也是它的一大特色。本文仅从事件系统入手，简要分析一下jQuery为什么提供mouseenter和mouseleave事件，它们与标准的mouseover、mouseout事件有什么区别。</p>
<h2>事件模型</h2>
<p>说到事件，就要追溯到网景与微软的“浏览器大战”了。当时，事件模型还没有标准，两家公司的实现就是事实标准。网景在Navigator中实现了
“事件捕获”的事件系统，而微软则在IE中实现了一个基本上相反的事件系统，叫做“事件冒泡”。这两种系统的区别在于当事件发生时，相关元素处理（响应）
事件的优先权不同。</p>
<p>下面举例说明这两种事件机制的区别。假设文档中有如下结构：</p>
<p></p>
<pre class="brush:xhtml;">&lt;div&gt;
    &lt;span&gt;
        &lt;a&gt;...&lt;/a&gt;
    &lt;/span&gt;
&lt;/div&gt;</pre>因为这三个元素是嵌套的，所以单击了a，实际上也就单击了span和div。换句话说，这三个元素都应该有处理单击事件的机会。在事件捕获机制下，
处理这个单击事件的优先次序是：div &gt; span &gt; a；而在事件冒泡机制下，处理这个单击事件的优先次序则是：a &gt; 
span &gt; div。<p></p>
<p>后来，W3C的规范要求浏览器同时支持捕获和冒泡机制，并允许开发人员选择把事件注册到哪个阶段。于是就有了下面这个注册事件的标准方法：</p>
<p></p>
<pre class="brush:js;">target.addEventListener(type, listener, useCapture Optional );</pre>其中：<p></p>
<ul><li>type：字符串，表示监听的事件类型</li>
<li>listener：监听器对象（JavaScript函数），在指定事件发生时可以收到通知</li>
<li>useCapture：布尔值，是否注册到捕获阶段</li>
</ul>
<p>在实际应用开发中，为了确保与IE（因为它不支持捕获）兼容，useCapture一般都指定为false（默认值也是false）。换句话说，只把事件注册到冒泡阶段；对于上面那个简单的例子来说，响应顺序就是：a &gt; span &gt; div。</p>
<h2>冒泡的副作用</h2>
<p>如前所述，IE的冒泡事件模型基本上成为了事实标准。但冒泡有一个副作用。</p>
<p>仍以前面的文档结构为例，假设它是界面中的一个菜单项，我们希望用户鼠标离开div时隐藏菜单。于是，我们给div注册了一个mouseout事
件。如果用户鼠标是从div离开的，那么一切正确。而如果用户鼠标是从a或span离开的，问题就来了。因为由于事件冒泡，从这两个元素开始分派的
mouseout事件都会传播到div，从而导致鼠标并没有离开div，菜单就提前隐藏了。</p>
<p>当然，冒泡的副作用不难避免。比如，给div内部的每个元素都注册mouseout事件，并使用.stopPropagation()方法阻止事件
进一步传播。对于IE，就得将事件对象的cancelBubble属性设置为false，取消事件冒泡。不过，这仍然回到自己处理浏览器不兼容性问题的老
路上了。</p>
<h2>优化方案</h2>
<p>为了避免冒泡的副作用，<strong>jQuery提供了mouseenter和mouseleave事件，就使用它们来代替mouseover和mouseout吧</strong>。</p>
<p>下面这个摘自jQuery的内部函数withinElement，就是为mouseenter和mouseleave提供支持的。翻译了一下注释，仅供大家参考。</p>
<p></p>
<pre class="brush:js;">// 下面这个函数用于检测事件是否发生在另一个元素的内部
// 在 jQuery.event.special.mouseenter 和 mouseleave 处理程序中使用
var withinElement = function( event ) {
    // 检测 mouse(over|out) 是否还在相同的父元素内
    var parent = event.relatedTarget;

    // 设置正确的事件类型
    event.type = event.data;

    // Firefox 有时候会把 relatedTarget 指定一个 XUL 元素
    // 对于这种元素，无法访问其 parentNode 属性
    try {

        // Chrome 也类似，虽然可以访问 parentNode 属性
        // 但结果却是 null
        if ( parent &amp;&amp; parent !== document &amp;&amp; !parent.parentNode ) {
            return;
        }

        // 沿 DOM 树向上
        while ( parent &amp;&amp; parent !== this ) {
            parent = parent.parentNode;
        }

        if ( parent !== this ) {
            // 如果实际正好位于一个非子元素上面，那好，就处理事件
            jQuery.event.handle.apply( this, arguments );
        }

    // 假定已经离开了元素，因为很可能鼠标放在了一个XUL元素上
    } catch(e) { }
},</pre><h2>结论</h2>
<p></p>
<p>在jQuery里，可以使用mouseenter和mouseleave事件来避免事件冒泡的副作用。</p>
<p>原文链接：<a href="http://www.ituring.com.cn/article/420">http://www.ituring.com.cn/article/420</a></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/10/15/jquery-impromptu-usage.html]]></link>
<title><![CDATA[好用的jQuery弹出框组件jQuery Impromptu]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Sat, 15 Oct 2011 11:30:49 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>在Web开发中，我们已经越来越离不开jQuery了，他的简单轻巧灵活已经风靡全球。我们在开发web的时候经常会遇到一些弹出窗口的需求，我们为了美化这个弹出框，增强用户体验，我们可能会用很多jQuery弹出窗口插件，太多了，Google一搜全是，那么今天我来介绍一个比较好用的jQuery弹出框插件<b>JQuery Impromptu</b>，JQuery Impromptu完美打造了一个简单实用的弹出框，大家可以试试。</p>
<p>其官方网站：<a href="http://trentrichardson.com/Impromptu/index.php" target="_blank">http://trentrichardson.com/Impromptu/index.php</a></p>
<p>在我们引入了这个库之后，我们可以使用一个最简单的调用方式：</p>
<p></p>
<pre class="brush:js;">$.prompt('Example 1');</pre>这行代码的效果如下：<p></p>
<p><img src="/Upload/EditorImage/20111015112621_6714.png" alt="" border="0" /></p>
<p align="left">正如大家看到的，非常简单的代码就能构造出一个很不错的对话框，当然这个插件的功能不止这些，还能更加强大，下面我就再举几个例子。</p>
<p align="left">我们还可以自定义对话框中显示的内容，甚至是定制我们自己的HTML，并且为对话框中的按钮指定回调事件：</p>
<p align="left"></p>
<pre class="brush:js;">var txt = 'Please enter your name:&lt;br /&gt;
    &lt;input type="text" id="alertName" 
    name="alertName" value="name here" /&gt;';
    
function mycallbackform(v,m,f){
    if(v != undefined)
    $.prompt(v +' ' + f.alertName);
}

$.prompt(txt,{
    callback: mycallbackform,
    buttons: { Hey: 'Hello', Bye: 'Good Bye' }
});</pre>运行效果如下：<p></p>
<p align="left"><img src="/Upload/EditorImage/20111015112709_7671.png" alt="" border="0" /></p>
<p align="left">当我们点击 Hey这个按钮之后，就会触发相应的回调事件，在我们的回调事件中，是弹出了另外一个对话框来显示问候信息：</p>
<p align="left"><img src="/Upload/EditorImage/20111015112734_8524.png" alt="" border="0" /></p>
<p align="left"> 我们还可以通过改变它的CSS前缀来修改对话框的外观：</p>
<p align="left"></p>
<pre class="brush:js;">var brown_theme_text = '&lt;h3&gt;Example 13&lt;/h3&gt;'+
    '&lt;p&gt;Save these settings?&lt;/p&gt;'+

    '&lt;img src="images/help.gif" alt="help" '+
    'class="helpImg" /&gt;';
$.prompt(brown_theme_text,{
    buttons:{Ok:true,Cancel:false}, 
    prefix:'brownJqi'
});</pre>效果如下：<p></p>
<p align="left"><img src="/Upload/EditorImage/20111015112844_9914.png" alt="" border="0" /></p>
<p align="left">好了，这个<b>JQuery Impromptu</b>插件就简单介绍到这里了，希望对大家有帮助</p>
<p></p>]]></description>
</item>

<item>
<link><![CDATA[http://www.itivy.com/jquery/archive/2011/10/15/jquery-ui-css-framework-comment.html]]></link>
<title><![CDATA[The jQuery UI CSS Framework中文详解]]></title>
<author><![CDATA[jQuery小子]]></author>
<category><![CDATA[]]></category>
<pubDate>Sat, 15 Oct 2011 10:42:46 GMT</pubDate>
<guid><![CDATA[]]></guid>
<description><![CDATA[<p>jQuery UI是一个基于jQuery的UI框架，我们在项目中常常会需要一些比较的样式，如果使用了jQuery 
UI那么很多的图标，样式什么的，就可以尽量使用jQuery UI里面已经定义好了的，因此我就对jQuery 
UI中的CSS简单做了点注释，提供自己准备利用jQuery UI的样式来写控件的朋友们，自己也顺带做下记录。</p>
<span style="font-weight:bold;">Layout Helpers(布局帮助)</span><ul><li>.ui-helper-hidden: Applies display: none to elements. (隐藏元素，适用于display:none可以隐藏的元素)</li>
<li>.ui-helper-hidden-accessible: Applies accessible hiding to elements (via abs positioning off the page) (隐藏元素，适用于绝对定位的元素，直接裁剪为1×1px的大小)</li>
<li>.ui-helper-reset: A basic style reset for UI elements. Resets things such as padding, margins, text-decoration, list-style, etc. (进行复位)</li>
<li>.ui-helper-clearfix: Applies float wrapping properties to parent elements</li>
<li>.ui-helper-zfix: Applies iframe "fix" css to iframe elements when needed in overlays.</li>
</ul>
<p style="font-weight:bold;">Widget Containers(控件容器)</p>
<ul><li>.ui-widget: Class to
 be applied on outer container of all widgets. Applies font family and 
font size to widget. Also applies same family and 1em font size to child
 form elements specifically, to combat inheritance
 issues in Win browsers. (容器，主要设置字体和字体大小) </li>
<li>.ui-widget-header:
 Class to be applied to header containers. Applies header container 
styles to an element and its child text, links, and icons. (容器标题区)</li>
<li>.ui-widget-content:
 Class to be applied to content containers. Applies content container 
styles to an element and its child text, links, and icons. (can be 
applied to parent or sibling of header)(容器内容区)</li>
</ul>
<p style="font-weight:bold;">Interaction States(交互状态)</p>
<ul><li>.ui-state-default: 
Class to be applied to clickable button-like elements. Applies 
"clickable default" container styles to an element and its child text, 
links, and icons. (默认状态)</li>
<li>.ui-state-hover:
 Class to be applied on mouseover to clickable button-like elements. 
Applies "clickable hover" container styles to an element and its child 
text, links, and icons. (鼠标移到元素上时的状态)</li>
<li>.ui-state-focus:
 Class to be applied on keyboard focus to clickable button-like 
elements. Applies "clickable hover" container styles to an element and 
its child text, links, and icons. (元素获得焦点时的状态)</li>
<li>.ui-state-active:
 Class to be applied on mousedown to clickable button-like elements. 
Applies "clickable active" container styles to an element and its child 
text, links, and icons.(激活（在鼠标点击与释放之间发生的事件）的元素的状态)</li>
</ul>
<p style="font-weight:bold;">Interaction Cues(交互提示)</p>
<ul><li>.ui-state-highlight:
 Class to be applied to highlighted or selected elements. Applies 
"highlight" container styles to an element and its child text, links, 
and icons. (高亮状态)</li>
<li>.ui-state-error:
 Class to be applied to error messaging container elements. Applies 
"error" container styles to an element and its child text, links, and 
icons. (错误状态)</li>
<li>.ui-state-error-text:
 An additional class that applies just the error text color without 
background. Can be used on form labels for instance. Also applies error 
icon color to child icons. (错误状态，不包括图标)</li>
<li>.ui-state-disabled: Applies a dimmed opacity to disabled UI elements. Meant to be added in addition to an already-styled element. (禁用的状态)</li>
<li>.ui-priority-primary: Class to be applied to a priority-1 button in situations where button hierarchy is needed. Applies bold text. (首要终点)</li>
<li>.ui-priority-secondary:
 Class to be applied to a priority-2 button in situations where button 
hierarchy is needed. Applies normal weight text and slight transparency 
to element.(次要重点)</li>
</ul>
<p style="font-weight:bold;">Icons(图标)</p>
<a name="States_and_images"></a> <p style="font-weight:bold;">States and images(状态和图片)</p>
<ul><li>.ui-icon: Base class to be applied to
 an icon element. Sets dimensions to 16px square block, hides inner 
text, sets background image to "content" state sprite image.
Note: .ui-icon class will be given a different 
sprite background image depending on its parent container. For example, a
 ui-icon element within a ui-state-default container will get colored 
according to the ui-state-default's icon color.(不同的状态是不同的图片)</li>
</ul>
<p>有如下几种：</p>
<p>1.ui-icon (默认图标)<br />
2.ui-widget-content .ui-icon (容器中内容图标)<br />
3.ui-widget-header .ui-icon (容器中标题图标)<br />
4.ui-state-default .ui-icon (默认状态图标)<br />
5.ui-state-hover .ui-icon, .ui-state-focus .ui-icon (鼠标移动到上方时或获得焦点时图标)<br />
6.ui-state-active .ui-icon (激活时图标)<br />
7.ui-state-highlight .ui-icon (高亮时图标)<br />
8.ui-state-error .ui-icon, .ui-state-error-text .ui-icon (错误时图标)</p>
<a name="Icon_types"></a> <p style="font-weight:bold;">Icon types</p>
<p>After declaring a ".ui-icon" class, 
you can follow up with a second class describing the type of icon you'd 
like. Icon classes generally follow a syntax of .ui-icon-{icon 
type}-{icon sub description}-{direction}.</p>
<p>For example, a single triangle icon pointing to the right looks like this: .ui-icon-triangle-1-e</p>
<p>jQuery UI's <a href="http://www.themeroller.com/"> ThemeRoller</a> provides the full set of CSS framework icons in its preview column. Hover over them to see the class name.</p>
<p>&nbsp;</p>
<p style="font-weight:bold;">Misc Visuals(杂项)</p>
<a name="Corner_Radius_helpers"></a> <p style="font-weight:bold;">Corner Radius helpers(圆角帮助)</p>
<ul><li>.ui-corner-tl: Applies corner-radius to top left corner of element. (左上角圆角)</li>
<li>.ui-corner-tr: Applies corner-radius to top right corner of element. (右上角圆角)</li>
<li>.ui-corner-bl: Applies corner-radius to bottom left corner of element. (左下角圆角)</li>
<li>.ui-corner-br: Applies corner-radius to bottom right corner of element. (右下角圆角)</li>
<li>.ui-corner-top: Applies corner-radius to both top corners of element. (左上和右上角圆角)</li>
<li>.ui-corner-bottom: Applies corner-radius to both bottom corners of element. (左下和右下角圆角)</li>
<li>.ui-corner-right: Applies corner-radius to both right corners of element. (右上和右下角圆角)</li>
<li>.ui-corner-left: Applies corner-radius to both left corners of element. (左上和左下角圆角)</li>
<li>.ui-corner-all: Applies corner-radius to all 4 corners of element.(四个角全部圆角)</li>
</ul>
<p style="font-weight:bold;">Overlay &amp; Shadow(遮罩层和阴影)</p>
<ul><li>.ui-widget-overlay: Applies 100% wxh dimensions to an overlay screen, along with background color/texture, and screen opacity. (遮罩层)</li>
<li>.ui-widget-shadow:
 Class to be applied to overlay widget shadow elements. Applies 
background color/texture, custom corner radius, opacity, top/left 
offsets and shadow "thickness". Thickness is applied via padding
 to all sides of a shadow that is set to match the dimensions of the 
overlay element. Offsets are applied via top and left margins (can be 
positive or negative)(阴影)</li>
</ul>]]></description>
</item>


</channel>
</rss>

