<!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>

最新文章

  1. C#创建、安装、卸载、调试Windows Service(Windows 服务)的简单教程
  2. easyui form表单提交应注意的问题
  3. BeanUtils: 威力和代价(转载)
  4. 论文笔记Outline
  5. php Internal Server Error
  6. AngularJs的UI组件ui-Bootstrap分享(四)——Datepicker Popup
  7. 去块率波 Deblocking filter
  8. hashCode()和equals()的用法
  9. sql之独立子查询和相关子查询总结
  10. hibernate中持久化对象的生命周期(三态:自由态,持久态,游离态 之间的转换)
  11. Java线程(学习整理)--2---加入另一个线程join
  12. vs UNICODE 零散的笔记
  13. delete和delete[]
  14. 请教 C# 异步 async await 问题
  15. 一口一口吃掉Hibernate(七)——继承映射
  16. Python中list的删除del&amp;remove小区别
  17. 学习requests_html
  18. linux find 10天内改动过的文件
  19. [Git] Squash all of my commits into a single one and merge into master
  20. GreenPlum数据加载

热门文章

  1. WeakRefence
  2. [React] Public Class Fields with React Components
  3. Android addTextChangedListener(文本监听)参数解释及实现EditText字数监听
  4. JS类型转换规则详解
  5. 单个和多个checkbox选中事件怎么写
  6. [Django] Get started with Django -- Install python and virtualenv
  7. js进阶 9-8 html标签如何实现禁止复制和粘贴
  8. iis配置反向代理oss
  9. css+html+js实现多级下拉和弹出菜单
  10. 【t004】切割矩阵