<!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','cursor':'pointer'});
            }, function () {
                $(this).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练习的更多相关文章

  1. jquery <li>标签 隔若干行 加空白或者加虚线

    $(function () { $('ul li').addClass(function (i) { return i % 6 == 5 ? "ab" : "" ...

  2. jquery li a 样式

    jQuery(".CwebtopNavContainer").find("li:last a").css("color","red ...

  3. jQuery li click失效问题

    转自:http://blog.sina.com.cn/s/blog_64008ed70101nyoz.html 项目中使用到jQuery脚本插入一段代码,然后给代码加事件,但是click事件失效,网上 ...

  4. jquery li练习2-恢复链条

    <!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"> ...

  5. jQuery 遍历ul li 添加 移除

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  6. jQuery的属性

    The Write Less , Do More ! jQuery的属性 1. attr(name|properties|key,value|fn) : 设置或返回被选元素的属性值 ①获取属性 < ...

  7. jquery $.extend()扩展插件获取焦点或失去焦点事件

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  8. 玩转Jquery,告别前端知道思路忘记知识点的痛苦

    本节内容: 本章主要讲解一下jquery,主要是工作中用的前端框架是datetables框架,然后datetables框架又是基于jqeury研发的,所以要想学一个东西,就必须要了解其底层,不然走路都 ...

  9. jQuery实践——选择器篇

      一.基本 #id: html:<div id="demo1">demo1</div> jQuery:$("#demo1").css( ...

随机推荐

  1. 【t070】二进制

    Time Limit: 1 second Memory Limit: 128 MB [问题描述] 求所有可以只用1和00拼成的长度为N的二进制数的个数除以15746的余数. 比如当N=4的时候,有5个 ...

  2. Android JobService的使用及源码分析

    Google在Android 5.0中引入JobScheduler来执行一些需要满足特定条件但不紧急的后台任务,APP利用JobScheduler来执行这些特殊的后台任务时来减少电量的消耗.本文首先介 ...

  3. 【codeforces 760C】Pavel and barbecue

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  4. Android BlueDroid(一):BlueDroid概述

    关键词:bluedroid bluez作者:xubin341719(欢迎转载,请注明作者,请尊重版权,谢谢!)欢迎指正错误.共同学习.共同进步!! 一.名词解释:(实用信息添加中--) BTI F: ...

  5. [Ramda] R.project -- Select a Subset of Properties from a Collection of Objects in Ramda

    In this lesson we'll take an array of objects and map it to a new array where each object is a subse ...

  6. System.ArgumentException: 已添加了具有相同键的项。(An item with the same key has already been added) 在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) 在 System.Web.Mvc.Js

    最近将一个项目从ASP.NET MVC 3升级至刚刚发布的ASP.NET MVC 5.1,升级后发现一个ajax请求出现了500错误,日志中记录的详细异常信息如下: System.ArgumentEx ...

  7. 【codeforces 765D】Artsem and Saunders

    [题目链接]:http://codeforces.com/contest/765/problem/D [题意] 给你一个函数f(x); 要让你求2个函数g[x]和h[x],使得g[h[x]] = x对 ...

  8. 收集 天创恒达高清采集卡TC-5A0N7

    版权声明:本文博客琅邪工作室原创文章,博客,未经同意不得转载.

  9. 【44.19%】【codeforces 727C】Guess the Array

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  10. ubuntu 在配置MySQL维修

    第一步 设备MySQL sudo apt-get install mysql-server 第二步骤 构造MySQL 2.1 vim /etc/mysql/my.cnf 到场bind-address ...