随笔分类 - jQuery 基础教程(第3版) ---习题答案
摘要://第一题 $(document).ready(function(){ $('#gallery').delegate('div.photo','click',function(){ $('div.photo').removeClass('selected'); $(this).addClass('selected'); }); }); //第二题...
阅读全文
摘要://第一题 $(document).ready(function(){ function stripe(){ $('#news').find('tr.alt').removeClass('alt'); $('#news tbody').each(function(){ $(this).children(':visible').has...
阅读全文
摘要://第二题 1 (function($){ $.fn.shadow=function(opts){ var options = $.extend({},$.fn.shadow.defaults,opts); return this.each(function(){ var $originalEle...
阅读全文
摘要://第一题 $(document).ready(function(){ $('#books').cycle({ timeout:3000, speed:1500, pause:true, before:function(){//回调函数 $('#slider').slider('value',$('...
阅读全文
摘要://第一题 $(document).ready(function(){ $('#dictionary').load('exercises-content.html .letter'); }); //第二题 (好像不太合理,E不能显示出来) $(document).ready(function(){ $('div.letter h3 a').hover(function(event...
阅读全文
摘要:1 //第一题 2 $('back to top').insertAfter('div.chapter p:gt(3)'); 3 $('').prependTo('body'); 4 5 //第二题 6 $('.chapter a[href*="top"]').click(function(){ 7 $('You were ...
阅读全文
摘要://第一题 $('#container').fadeIn('slow'); //第二题 var color; $('p').hover(function(){ color = $(this).css('backgroundColor'); $(this).css('backgroundColor','yellow'...
阅读全文
摘要://第一题 $('div.author').bind('click',function(){ $(this).addClass('selected'); //console.log(123); }); //第二题 $('h3.chapter-title').dblclick(function(event){ $(event.target).parent...
阅读全文
摘要:1 //第一题 1. 2 $('#selected-plays>li>ul>li').addClass('special'); 3 //2. 4 $('li').children().find('li').addClass('special'); 5 6 //第二题 7 $('tr').find('td:eq(2)'...
阅读全文

浙公网安备 33010602011771号