jQuery

来源:互联网 发布:c语言汉字变量 编辑:程序博客网 时间:2024/05/30 23:02
  1. What is jQuery
  2. Using jQuery
<script src="jquery.min.js"></script>
<script src="application.js"></script>

  CSS
p { ... }
#container { ... }
.articles { ... }

jQuery
$("p");
$("#container");
$(".articles");

  1. Searching the DOM


<h1>Where do you want to go?<h1>
<h2>Travel Destinations</h2>
<p>Plan your next adventure.</p>
<ul id="destinations">
  <li>Rome<li>
  <li>
    <ul>
      <li>Parist</li>
    </ul>
  </li>
  <li class='promo'>Rio</li>
</ul>
$("#destinations li")
$("#destinations > li")
$("#destinations li:first")
$("#destinations li:odd")
$("#destinations li:even")





  1. Traversing the DOM
  2. Manipulating the DOM
  3. Acting on Interaction
  4. Refactor using Traversing
  5. Traversing and Filtering
  6. On DOM Load
  7. Expanding on on
  8. Keyboard events
  9. Link Layover
  10. Taming CSS
  11. Animation
原创粉丝点击