![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Jquery
tianya111cy
这个作者很懒,什么都没留下…
展开
-
jquery 操作 select
//添加option$("<option value='"+blogTypeName+"'>"+blogTypeName+"</option>").appendTo("#blogCategory_BlogWrite");原创 2011-05-11 10:20:43 · 59 阅读 · 0 评论 -
zeroclipboard实现跨浏览器复制功能
所需文件1. ZeroClipboard.js2. ZeroClipboard.swf 使用1. 设置好ZeroClipboard.swf的位置,可在ZeroClipboard.js中修改,也可调用ZeroClipboard.setMoviePath方法2. var clip = new ZeroClipboard.Client();3. 设置好透明flash层...原创 2013-06-05 10:44:46 · 121 阅读 · 0 评论 -
jquery获取display样式值
var display = $("#hiddenDiv").css("display");原创 2012-09-04 16:47:04 · 3378 阅读 · 0 评论 -
jquery与prototype冲突的解决办法
<s.c.r.i.p.t type="text/javas.c.r.i.p.t"> jQuery.noConflict(); //将变量$的控制权让渡给prototype.js jQuery(function($){ //使用jQuery $("p").click(function(){ //继续使用 $ 方法 alert( $(this).text() ); }); }); $("p...原创 2013-05-28 11:14:17 · 126 阅读 · 0 评论 -
jquery根据自定义属性选择标签
<div myattr="test"></div>使用$("div[myattr='test']")进行选择原创 2013-04-27 16:45:17 · 383 阅读 · 0 评论 -
jquery实现div从左向右弹出的效果
<div id="nav" style="width:0px;height:600px;position:fixed;left:0px;"> <div id="navcontent" style="z-index:10;background:lightgreen;width:0px;height:100%;overflow:hidden;position:fixed;">&原创 2012-11-07 10:22:54 · 2985 阅读 · 0 评论 -
jquery获取鼠标位置
var x = e.originalEvent.x;//离屏幕左边的距离,或者e.pageX(离实际页面左边的距离,即离屏幕左边的距离加上滚动条滚动的距离)var y = e.originalEvent.y;//离屏幕顶部的距离,或者e.pageY(同上)...原创 2012-07-27 11:17:03 · 357 阅读 · 0 评论 -
jquery获取页面参数
$(window).height(); //浏览器当前窗口可视区域高度 $(window).scrollTop();//获取横向滚动条向下滚动的距离$(window).scrollLeft();//获取横向滚动条向右滚动的距离$(document).height(); //浏览器当前窗口文档的高度 $(document.body).height();//浏览器当前窗口文档body的高度 $...原创 2012-07-27 11:10:24 · 245 阅读 · 0 评论 -
jquery弹出层里的文本框无法输入内容
$("#div_test").html("<input type='text'/>");用上面代码弹出的div里的input无法输入内容(不是所有的浏览器都这样)原因是部分浏览器里无法获取动态添加的文本框的焦点,所以必须要在上面代码下面添加以下代码$("input").click(function(){$(this).focus();});...原创 2012-07-19 16:50:20 · 418 阅读 · 0 评论 -
jquery-ui sortable用法
所有的事件回调函数都有两个参数:event和ui,浏览器自有event对象,和经过封装的ui对象 ui.helper - 表示sortable元素的JQuery对象,通常是当前元素的克隆对象 ui.position - 表示相对当前对象,鼠标的坐标值对象{top,left} ui.offset - 表示相对于当前页面,鼠标的坐标值对象{top,left} ui.item - 表示当...原创 2012-07-18 16:05:46 · 118 阅读 · 0 评论 -
jquery的change事件
change事件触发条件是1.内容改变2.失去焦点这两个条件同时满足时才能触发change事件 如果想实现内容改变时就触发可以选用keyup事件原创 2012-07-03 13:41:17 · 202 阅读 · 0 评论 -
jquery获取位置和高度宽度
var left = $(this).offset().left;var top = $(this).offset().top;var height = $(this).height();var width = $(this).width(); 设置$(this).css({"left" : left, "top" : top });原创 2012-06-13 13:29:14 · 58 阅读 · 0 评论 -
jquery文本框change事件无效
$("input[name='from']").change(function(){ alert("==");});change事件不起作用,可用如下方法(但是下面的方法仅对IE适用)$("input[name='from']").bind("propertychange", function() { alert("=="); });...原创 2012-06-07 10:59:51 · 1030 阅读 · 0 评论 -
JQuery选择器
$("#myELement") 选择id值等于myElement的元素,id值不能重复在文档中只能有一个id值是myElement所以得到的是唯一的元素 $("div") 选择所有的div标签元素,返回div元素数组 $(".myClass") 选择使用myClass类的css的所有元素 $("*") 选择文档中的所有的元素,可以运用多种...原创 2011-04-06 09:38:05 · 55 阅读 · 0 评论 -
jQuery插入,复制、替换和删除节点
$(document).ready(function(){ //几种添加节点的方法 //$("p").append("<b>你好吗?</b>");//向p元素中追加《b》 //$("<b>你好吗?</b>").appendTo("p");//将《b》追加到p元素中 //$("原创 2011-04-06 09:25:30 · 72 阅读 · 0 评论 -
JQUERY TABLE 中的列选择
1.$("table tr").find("td:first").html(11); 2.$("table tr").each(function(){$(this).find("td:eq(1)").html(22); }) 3.$("table tr td:first-child").html("first");$("table tr td:last-原创 2011-04-06 09:23:02 · 150 阅读 · 0 评论 -
jquery 筛选器
$("a[id^='pageTag']").click(function(){ alert(this.id); });其中a与中括号之间如果有空格,如$("a [id^='pageTag']"),则jquery不识别...原创 2011-05-17 14:04:58 · 113 阅读 · 0 评论 -
jquery获操作父窗口元素并关闭当前子窗口
$("a[name='file']").click(function(){$("input[class='cke_dialog_ui_input_text'",window.opener.document).val(this.id);window.close();});原创 2013-09-27 10:28:51 · 1500 阅读 · 0 评论