jquery li练习2-恢复链条
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script src="jquery-1.7.1.min.js"></script>
<script>
$(function () {
$('li').hover(function () {
//$(this).css('color','red').prevAll().css('color','yellow');//破坏了链
$(this).css('color','red').prevAll().css('color','yellow').end().nextAll().css('color', 'lightBlue');//end()恢复最近断的链条
}, function () {
$('li').css('color', 'black');
}).click(function () {
$(this).appendTo('#ul2');
});
});
</script>
</head>
<body>
<ul id="ul1">
<li>北京</li>
<li>上海</li>
<li>广州</li>
<li>深圳</li>
</ul>
<ul id="ul2">
</ul>
</body>
</html>
jquery li练习2-恢复链条的更多相关文章
- jquery <li>标签 隔若干行 加空白或者加虚线
$(function () { $('ul li').addClass(function (i) { return i % 6 == 5 ? "ab" : "" ...
- jquery li a 样式
jQuery(".CwebtopNavContainer").find("li:last a").css("color","red ...
- jQuery li click失效问题
转自:http://blog.sina.com.cn/s/blog_64008ed70101nyoz.html 项目中使用到jQuery脚本插入一段代码,然后给代码加事件,但是click事件失效,网上 ...
- jquery li练习
<!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"> ...
- jQuery 遍历ul li 添加 移除
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- Jquery购物车jsorder改进版,支持后台处理程序直接转换成DataTable处理
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- Jquery.Uploadify实现批量上传显示进度条 取消 上传后缩略图显示 可删除
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpLoad.aspx.cs&q ...
- JQuery DOM操作 、属性和CSS样式操作、其他函数
DOM操作 1.在div1内部最后追加一个节点 $("#div1").append("<img src='../01-HTML基本标签/img/Male.gif'/ ...
- jQuery的属性
The Write Less , Do More ! jQuery的属性 1. attr(name|properties|key,value|fn) : 设置或返回被选元素的属性值 ①获取属性 < ...
随机推荐
- [Webpack] Access Webpack Dev Server from Mobile Safari on an iPhone
Testing your sites on mobile devices is a critical part of the development process. Webpack dev serv ...
- [SCSS] Use Standard Built-in SCSS Functions for Common Operations
We can use javascript for color and opacity variations, math, list and map logic or to see if someth ...
- ios开发事件处理之:五:事件的响应
- js进阶 11-13 jquery如何包裹元素和去除元素外的包裹
js进阶 11-13 jquery如何包裹元素和去除元素外的包裹 一.总结 一句话总结:wrap().wrapAll().unwrap().innerWrap()四个方法 1.jquery中unwr ...
- windows下python安装uwsgi
1.使用pip安装 pip install uwsgi 报错:os没有uname() 解决: 定位到uwsgiconfig.py文件中,首先import platform后,将os.unam()都改为 ...
- poi读取excell表格
原文链接:http://blog.csdn.net/qq_37936542/article/details/79024847 最近项目需要实现一个将excell中的数据导入数据库,在网上找到这篇文章, ...
- 贝勒爷教你怎样在Mac上安装Microsoft Office
1.亲,鼠标双击该安装文件: 2.非常好,你将会看到这样一个东东(假设没有看到那就不要来见我了): 3.不错,再次双击红色区域,假设出现下面提示,别怕哈: 4.点击"好"butto ...
- 【u032】均衡发展
Time Limit: 1 second Memory Limit: 128 MB [问题描述] 神牛小R在许多方面都有着很强的能力,具体的说,他总共有m种能力,并将这些能力编号为1到m.他的能力是一 ...
- 判断navigation中父控制器类型
for (UIViewController *controller in self.navigationController.viewControllers) { if ([controller is ...
- POJ 2728 - 最小比例生成树
传送门 题目大意 有n个村庄,每个村庄都有一个(x, y)坐标和z海拔,定义两个村庄间的dist为坐标的距离,cost为海拔差的绝对值,求图的一颗生成树,使得\(\frac{\sum cost}{\s ...