jquery
fliay
这个作者很懒,什么都没留下…
展开
-
jquery简单浏览打图
无标题文档$(function(){var x=10;var y=20;$("a.tooltip").mouseover(function(e){var myTitle=this.title;this.title="";var imgTitle=this.myTitle?""+this.myTitle:"";var tooltip=""+imgT原创 2012-12-31 17:05:36 · 459 阅读 · 0 评论 -
jquery 表格(radio)
无标题文档 .even{background:#CCC}.odd{background:#999 }.selected{background:red } $(function(){//$("tr:odd").addClass("odd");//给奇数添加样式//$("tr:even").addClass("even原创 2012-12-31 20:37:02 · 635 阅读 · 0 评论 -
jquery 实现帅选
无标题文档 .even{background:#CCC}.odd{background:#999 }.selected{background:red } $(function(){$('tbody>tr').click(function(){if($(this).hasClass('selected')){//判断原创 2012-12-31 21:48:17 · 541 阅读 · 0 评论 -
Jquery校验
一导入js库二、默认校验规则(1)required:true 必输字段(2)remote:"check.php" 使用ajax方法调用check.php验证输入值(3)email:true 必须输入正确格式的电子邮件(4)url:true 必转载 2013-01-18 15:07:34 · 477 阅读 · 0 评论 -
jquery 对checkbox的控制(全选,反选)
无标题文档 .highlight{background:#FF3300;} $(function(){$("#all").click(function(){$('[name=items]:checkbox').attr("checked",true);})$("#no").click(function(){$('[name=i原创 2012-12-31 17:13:59 · 502 阅读 · 0 评论 -
jquery对textarea的控制大小
无标题文档 .highlight{background:#FF3300;} $(function(){var $comment=$('#comment');$('.bigger').click(function(){if(!$comment.is(":animated")){if($comment.height()//重新设置原创 2012-12-31 17:12:04 · 3253 阅读 · 0 评论 -
jquery animate实现动画
无标题文档 #panel{position:relative;width:100px;height:100px;border:1px solid #0050DO;background:#96E555;cursor:pointer;}#panel2{position:relative;width:100px;height:100原创 2012-12-31 17:09:47 · 693 阅读 · 0 评论 -
jquery bind click mouseout hover mouseover事件
无标题文档 .highlight{background:#FF3300;} $(function(){$("#panel h5.head").bind("click",function(){if($(this).next("div.content").is(":visible")){$(this).next("div.cont原创 2012-12-31 17:07:55 · 4742 阅读 · 0 评论 -
jquery 表格(checkbox)
无标题文档 .even{background:#CCC}.odd{background:#999 }.selected{background:red } $(function(){$('tbody>tr').click(function(){if($(this).hasClass('selected')){$(原创 2012-12-31 20:55:10 · 713 阅读 · 0 评论 -
jquery鼠标左中右(event)
无标题文档 .highlight{background:#FF3300;} $(function(){$("html").mousedown(function(){if(event.which==2){alert("我点了滚动按钮")}if(event.which==1){alert("我左击了")}if(event.wh原创 2012-12-31 17:10:52 · 636 阅读 · 0 评论 -
jquery 简单校验
无标题文档 .high{color:red;} funct=$(function(){$("form :input.required").each(function(){var $required=$("*");$(this).parent().append($required);});$('form :input').b原创 2012-12-31 17:15:56 · 389 阅读 · 0 评论 -
jquery 针对两个select下拉的数据操作
无标题文档 .centent{float:left;} $(function(){$("#add").click(function(){var $options=$('#select1 option:selected');//获取选中的项目//if($options.length==0){// alert("请选一项"原创 2012-12-31 17:15:06 · 563 阅读 · 0 评论