fd-gulp-convert-encoding
Version:
convert file to assigned charset
61 lines (49 loc) • 1.47 kB
JavaScript
/**
* ��ȡ�����������
* @author tiegen.zhutg
* date:2012.05.16
*/
!(function($){
var Sandbox,
SU = Qingguo.Utility,
self,
configs = {
rootId:'#sw_mod_searchlist',
photo:'.com-bigpic',
end:0
};
function OfferShopwindowHover(sb) {
Sandbox = sb;
return OfferShopwindowHover;
}
$.extend(OfferShopwindowHover,{
init:function(cfg){
self=this;
self.config = $.extend(false, {}, configs, cfg);
self.root = $(self.config.rootId);
if( self.root.length === 0){
return ;
}
self._bindEvent();
},
_switchMainImg:function(){
self.root.on("hover","a.com-smallphoto",function(e){
var currentElem=$(this),src=currentElem.find("img").attr("src").replace(".64x64.",".search.");
currentElem.parents("li.offer").find("img.sm-offershopwindow-mainImg").attr("src",src);
});
},
_bindEvent:function(){
//offerͼƬhover
self.root.on("mouseenter", self.config.photo , function(){
$(this).addClass('sm-offerShopwindow-photo-hover');
});
self.root.on("mouseleave", self.config.photo, function(){
$(this).removeClass('sm-offerShopwindow-photo-hover');
});
self._switchMainImg();
},
end:0
});
Qingguo.Business.OfferShopwindowHover = OfferShopwindowHover;
AppCore.register("sw_mod_offerShopwindowHover", "Qingguo.Business.OfferShopwindowHover");
})(jQuery);