来源于: Learning jQuery, 4th Edition

What jQuery does:

1. Access elements in a document;

$('div.content').find('p');

 

2. Modify the appearance of a web page;

$('ul>li:first').addClass('active');

 

3. Alert the content of a document;

$('#container').append('<a href="more.html">more</a>');

 

4. Respond to a user's interaction;

$('button.show-details').click(function(){

$('div.details').show();

});

 

5. Animate changes being made to a document;

$('div.details').slideDown();

 

6. Retrieve information from a server without refreshing a page;

$('div.details').load('more.html #content');

 

7. Simplify common JavaScript tasks: 

$.each(obj,function(key,value){

total +=value;

});

相关文章:

  • 2021-06-04
  • 2021-06-11
  • 2022-12-23
  • 2021-08-18
  • 2021-07-19
  • 2021-09-06
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2021-08-07
  • 2021-07-12
  • 2021-08-26
  • 2021-11-27
  • 2022-01-15
  • 2021-11-17
  • 2021-08-21
相关资源
相似解决方案