第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

this.pic=$('#container dl').find('.pic');不是相等么 為什么下面就不能就不能寫 this.pic ???

this.pic=$('#container dl').find('.pic');不是相等么 為什么下面就不能就不能寫 this.pic ???

慕標(biāo)1076333 2017-10-14 11:58:33
function Products(){ ? ? ? ? ?this.pic=$('#container dl').find('.pic'); ? } ? Products.prototype={ ? ? ? ?bindDom:function(k){ ? ? ? ? ? ?var html = [ ? ? ? ? ? ? ? ?'<dl>', ? ? ? ? ? ? ? ? ? ? '<dt><a href="javascript:;"><img class="pic" src="'+k.image+'" width="384" height="225" /></a></dt>', ? ? ? ? ? ? ? ? ? ? '<dd>', ? ? ? ? ? ? ? ? ? ? ? '<span>', ? ? ? ? ? ? ? ? ? ? ? ? '<a href="javascript:;">', ? ? ? ? ? ? ? ? ? ? ? ? '<em>'+k.discount+'</em>'+k.title+'', ? ? ? ? ? ? ? ? ? ? ? '</a>', ? ? ? ? ? ? ? ? ? ? '</span>', ? ? ? ? ? ? ? ? ? ?'</dd>', ? ? ? ? ? ? ? ? ? '<dd class="price">', ? ? ? ? ? ? ? ? ? ? '<em>'+k.newPrice+'</em>', ? ? ? ? ? ? ? ? ? ? '<del>'+k.oldPrice+'</del>', ? ? ? ? ? ? ? ? ? ? '<i>'+k.time+'</i>', ? ? ? ? ? ? ? ? ?'</dd>', ? ? ? ? ? ? ? ?'</dl>' ? ? ? ? ? ?].join(""); ? ? ? ? ? ?$("#container").append(html); ? ? ? ? ? ? return this; ? ? ? ?}, ? ? ? bindEvent:function(){ ? ? ? ? ? // * data總共有6組數(shù)據(jù) 渲染到頁(yè)面里的圖片也有6個(gè)沒(méi)問(wèn)題// console.log(this.pic); ? ?/* 輸出 ? ? ?init(0) ? ? ?init(1) ? ? ?init(2) ? ? ?init(3) ? ? ?init(4) ? ? ?init(5) ? / ?// console.log($('#container').find('.pic')); ? ? ? ? ?/*輸出 ? ? ? ? ? init(1) ? ? ? ? ? init(2) ? ? ? ? ? init(3) ? ? ? ? ? init(4) ? ? ? ? ? init(5) ? ? ? ? ? init(6)*/ ? ? ? ? ?/* this.pic.hover(function(){ ? ? ? ? ? ?//最后一個(gè)元素始終不能觸發(fā)事件 ? ? ? ? ? ? ? ?$(this).css({'transform':'rotate(360deg)'}); ? ? ? ? ? ?},function(){ ? ? ? ? ? ? ? ?$(this).css({'transform':'rotate(0)'}); ? ? ? ? ? ?});*/ ? ? ? ? ? $('#container').find('.pic').hover(function(){ ? ? ? ? ?//最后一個(gè)元素也觸發(fā)了事件 ?構(gòu)造函數(shù)里定義的 this.pic=$('#container dl').find('.pic');不是相等么 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //為什么就不能寫 this.pic ??? ? ? ? ? ? ? ? $(this).css({'transform':'rotate(360deg)'}); ? ? ? ? ? },function(){ ? ? ? ? ? ? ? $(this).css({'transform':'rotate(0)'}); ? ? ? ? ? }) ? ? ? } ? }; ? //data總共有6組數(shù)據(jù) ? for(var i=0;i<data.length;i++){ ? ? ? new Products().bindDom(data[i]).bindEvent() ? }
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1303 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)