最贊回答 / 蛋黃醬
在_initDomEvent函數(shù)里已經(jīng)定義過this.$slider = $(opts.sliderSelector); ??this.$slider并不是options對象的屬性,而是用$(opts.sliderSelector)獲取的值
2016-10-10
其實(shí)我想說的是聽不懂的很多是跟自身的知識層面有很大的關(guān)系,就像我每次聽不懂時,我就會先擱置在哪,等過上一定的時間(在這段時間又充實(shí)了自己),再回頭來看,發(fā)現(xiàn)這樣效果真的好很多啦!所以更多的問題還是在自身,希望小伙伴們能正視一下這個問題,不要一味認(rèn)為是老師的問題。
2016-10-10
jquery基礎(chǔ)不好的我努力跟到這一節(jié),完全不懂此章的內(nèi)容
2016-10-02
源碼:https://github.com/Mqleaf/Practice-in-IMOOC/tree/master/1%20scrollbar
2016-10-01
鼠標(biāo)移動到滾動條上面,滾動滾輪,內(nèi)容跟滾動條是沒法滾動的,self.$cont.on 改成self.$cont.parent().on 就可以了
2016-09-30
varcontHeight=this.$cont[0].scrollHeight,contParentHeight=this.$cont.parent().height(),barHeight=this.$bar[0].scrollHeight;var sliderHeight = (contParentHeight*barHeight)/contHeight;if(contHeight <= contParentHeight){ return;}else{ this.$slider.css("height",sliderHeight + "px");}
2016-09-29
基本按照老師的代碼實(shí)現(xiàn)了功能 感覺有些地方太累贅了。??赡苁俏依斫獾膯栴}吧
2016-09-28