<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>寂静的深海 &#187; jQuery</title>
	<atom:link href="http://www.deepseath.com/?feed=rss2&#038;tag=jquery" rel="self" type="application/rss+xml" />
	<link>http://www.deepseath.com</link>
	<description></description>
	<lastBuildDate>Mon, 29 Jan 2024 09:55:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>jQuery处理同级事物的一个方式</title>
		<link>http://www.deepseath.com/?p=772</link>
		<comments>http://www.deepseath.com/?p=772#comments</comments>
		<pubDate>Fri, 10 Sep 2010 07:00:28 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[实验室]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=772</guid>
		<description><![CDATA[呵呵，标题有点绕，不知道这样表达是否达意。其实就是同类型（级别）的事件触发的判断处理而已，还搞不明白？-_-!我的表达有问题，那就看下面的代码吧： &#60;table&#62; &#60;tr id="data_3"&#62; &#60;td&#62;row1&#60;/td&#62; &#60;td&#62;Row2&#60;/td&#62; &#60;td&#62;&#60;button type="button" class="_operation"&#62;编辑&#60;span class="is_hidden"&#62;(e)&#60;/span&#62;&#60;/button&#62; &#60;button type="button" class="_operation"&#62;删除&#60;span class="is_hidden"&#62;(d)&#60;/span&#62;&#60;/button&#62;&#60;/td&#62; &#60;/tr&#62; &#60;tr id="data_10"&#62; &#60;td&#62;row2&#60;/td&#62; &#60;td&#62;Row2&#60;/td&#62; &#60;td&#62;&#60;button type="button" class="_operation"&#62;编辑&#60;span class="is_hidden"&#62;(e)&#60;/span&#62;&#60;/button&#62; &#60;button type="button" class="_operation"&#62;删除&#60;span class="is_hidden"&#62;(d)&#60;/span&#62;&#60;/button&#62;&#60;/td&#62; &#60;/tr&#62; &#60;/table&#62; 要处理上面的每行数据的“编辑”和“删除”按钮。我通过下面的jQuery处理： /*&#60;![CDATA[*/ $(function(){ $('._operation').live('click',function(){ var    str_op    =    (($(this).text()).match(/\((e&#124;d)\)/i)); var    op        =    str_op[1]; var    pObj    =   [...]]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=772</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(转)基于jQuery的上下无缝滚动应用(单行或多行)</title>
		<link>http://www.deepseath.com/?p=763</link>
		<comments>http://www.deepseath.com/?p=763#comments</comments>
		<pubDate>Thu, 19 Aug 2010 13:59:36 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[程序人生]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[无缝滚动]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=763</guid>
		<description><![CDATA[有时候能用得着，自己懒的写（估计写也不是很好，嘿嘿），看到一个插件。转自：http://mrthink.net/js-jq-autoscroll-updown/ &#60;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&#62;&#60;/script&#62; &#60;style&#62; /*reset css*/ body{font-size:0.8em;letter-spacing:1px;font-family:"微软雅黑"; line-height:1.8em} div,h2,p,ul,li{margin:0;padding:0} h1{font-size:1em; font-weight:normal;} h1 a{background:#047; padding:2px 3px; color:#fff; text-decoration:none;} h1 a:hover{background:#a40000; color:#fff; text-decoration:underline} h3{color:#888; font-weight:bold;font-size:1em; margin:1em auto; position:relative} /*demo css*/ h2{background:#a40000; font-size:12px; color:#fff; font-weight:normal; text-align:center; width:100px; height:25px;line-height:25px; margin:30px 0 0 20px} ul.line,ul.mulitline{width:500px; height:30px; background:#eee; overflow:hidden;margin-bottom:20px;border:2px solid #a40000} ul.mulitline{height:90px} li{height:30px;text-indent:15px; font-size:12px; line-height:30px;list-style:none} &#60;/style&#62; &#60;script&#62; /******************************* * @author Mr.Think [...]]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=763</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CKEditor或者FCKEditor编辑器的分页处理</title>
		<link>http://www.deepseath.com/?p=733</link>
		<comments>http://www.deepseath.com/?p=733#comments</comments>
		<pubDate>Tue, 27 Jul 2010 07:40:34 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[实验室]]></category>
		<category><![CDATA[CKEditor]]></category>
		<category><![CDATA[FCKEditor]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[开发]]></category>
		<category><![CDATA[正则]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=733</guid>
		<description><![CDATA[CKEditor就是FCKEditor的改名版本，呵呵。基于javascript的前端HTML编辑器，一般做内容管理系统的基本都用过这个编辑器，很强大很方便。 做内容管理某个内容可能文字会很多，分开发表的话不方便维护管理，一般就是直接使用CKEditor的分页功能，说白了这个无非就是类似下面的一段HTML代码：   如果要想在前台输出的时候分页是做不到的。我一般会有两种方式进行处理： 1.利用服务端在输出到页面前进行分页。 2.利用前端javascript直接进行分页。 习惯上我比较喜欢第一种，呵呵。第二种在目前的项目中准备要用到。 先说第一种方式，其实就是利用PHP将CKEditor的分页代码替换为某个标识符，然后进行下一步处理。 比如，利用正则将分页代码替换为“&#60;!&#8211;/*page-breaker*/&#8211;&#62;” &#60;?php $content = preg_replace('/&#60;div\s*style\s*=\s*"page-break-after\s*:\s*always\s*;\s*"[^&#60;\/div&#62;]*&#62;\s*&#60;span\s*style\s*=\s*"\s*display\s*:\s*none\s*;\s*"\s*[^&#60;\/span&#62;]*&#62;(.+)&#60;\/span&#62;\s*&#60;\/div&#62;/iUs',"&#60;!--/*page-breaker*/--&#62;",$content); ?&#62; 这样就将HTML的分页代码替换为一个常规的字符串。然后利用explode函数重组为数组进行分页处理。当然，如果喜欢可以每次都使用正则直接输出一个数组^_^ 第二种方式，是参考别人利用jQuery写的：http://www.blogjava.net/haha1903/archive/2010/06/23/324223.html，暂时没使用过，记下来备用吧，呵呵。 $(function() { var top = "#content"; var content = $(top); var all = content.find("*"); var pages = []; function hideContent() { all.hide(); } function showArray(arr) { $.each(arr, function(i) { this.show().parentsUntil(top).show(); }); } function initPages(pageBreaks) { pageBreaks.each(function(index) { $(this).attr("id", "pageBreak" [...]]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=733</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一个有意思的函数传参方法</title>
		<link>http://www.deepseath.com/?p=678</link>
		<comments>http://www.deepseath.com/?p=678#comments</comments>
		<pubDate>Fri, 21 May 2010 14:52:20 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[实验室]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[函数]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=678</guid>
		<description><![CDATA[最近在做的项目，虽然有很多前端的东西，现在不喜欢搞前端，觉得特麻烦，累。不如后台程序部分好玩，直接写代码还是很有意思的。 说实话，这么多年始终对于javascript属于入门汉的状态，主要是觉得javascript相对与服务端的PHP来说，不如PHP直接跟数据库打交道有意思。 不过，最近接触了好多jQuery，突然发现javascript原来不需要了解太多了，哈哈。jQuery真的是个好东西。 在使用和制作jQuery扩展的时候，发现jQuery有一个很有趣的函数传参办法，那就是直接利用数组或者已经格式化了的json字符串，这样做的好处显而易见——不必要记住函数参数的具体顺序，哪个在先哪个在后都无所谓。 现在懒得学习了，PHP手册也仅仅找需要的，加之英语实在不太好，所以在我的印象里，似乎php没有类似的方法（当然PHP类的那个不算在内） 晚上无聊的时候，尝试写了一个乱弹代码，觉得还是挺好玩的。 &#60;?php function call_function_param_arr($func_param_arr){ $var1='val1'; $var2='val2'; $var3='val3'; $var4='val4'; $var5='val5'; $var6='val6'; $var7='val7'; $var8='val8'; $var9='val9'; extract($func_param_arr,EXTR_IF_EXISTS); for ( $i=1;$i&#60;=9;$i++ ) { $tmp = 'var'.$i; echo "var{$i} = {$$tmp}&#60;br /&#62;"; } } function call_function_param_json($func_param_json){ $var1='val1'; $var2='val2'; $var3='val3'; $var4='val4'; $var5='val5'; $var6='val6'; $var7='val7'; $var8='val8'; $var9='val9'; extract(json_decode($func_param_json,true),EXTR_IF_EXISTS); for ( $i=1;$i&#60;=9;$i++ ) { $tmp = 'var'.$i; echo [...]]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=678</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>收集一下jQuery关于select标签的操作</title>
		<link>http://www.deepseath.com/?p=660</link>
		<comments>http://www.deepseath.com/?p=660#comments</comments>
		<pubDate>Mon, 03 May 2010 17:05:49 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[日积月累]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=660</guid>
		<description><![CDATA[jQuery是一个非常好玩的东东，很方便。由于本身对于javascript并不是非常的精通，因此特别对于操作select标签操作机器不入脑。 收集一下关于select标签操作的例子，备忘一下吧，出处找不到了。 //获取第一个option的值 $('#test option:first').val(); //最后一个option的值 $('#test option:last').val(); //获取第二个option的值 $('#test option:eq(1)').val(); //获取选中的值 $('#test').val(); $('#test option:selected').val(); //设置值为2的option为选中状态 $('#test').attr('value','2'); //设置第一个option为选中 $('#test option:last').attr('selected','selected'); $("#test").attr('value' , $('#test option:last').val()); $("#test").attr('value' , $('#test option').eq($('#test option').length - 1).val()); //获取select的长度 $('#test option').length; //添加一个option $("#test").append(" ff "); $(" ff ").appendTo("#test"); //添除选中项 $('#test option:selected').remove(); //指定项选中 $('#test option:first').remove(); //指定值被删除 $('#test option').each(function(){ if( $(this).val() == '5'){ $(this).remove(); [...]]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=660</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>【原创】jQuery插件之Email地址格式判断</title>
		<link>http://www.deepseath.com/?p=650</link>
		<comments>http://www.deepseath.com/?p=650#comments</comments>
		<pubDate>Mon, 19 Apr 2010 07:39:02 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[实验室]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=650</guid>
		<description><![CDATA[呵呵，不算是什么特别的东西，这个应该是第一次写的jQuery的插件。 jQuery.ISEmail = function(email){ var strlen = email.length; var email_rule = /^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/; return ( strlen &#62;= 6 &#38;&#38; strlen &#60; = 40 &#38;&#38; email_rule.test(email) ); } 使用很简单： if ($.ISEmail('test@test.com')) { alert('Email 地址格式正确'); } else { alert('Email 地址格式错误'); } 一直都在使用，未发现特别的问题，如果你使用过程发现什么错误，请告诉我:)谢谢。]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=650</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
