提高广告的点击率200%这个简单但有效的脚本。 顶栏颜色 顶栏字体颜色 顶栏字体 面具颜色 面具不透明 垂直偏移量 横向偏移量//set the mask offset var dc_ce_vertical_offset = 0; var dc_ce_horizontal_offset = 0; //add the masks and the message just before the closed body tag var mask_and_message = '
'; var mask_and_message = mask_and_message + ''; var mask_and_message = mask_and_message + ''; var mask_and_message = mask_and_message + ''; var mask_and_message = mask_and_message + ' '; $('body').append(mask_and_message); //handle the hover behavior on the adv $('.ctr-enhancer').hover( function(){ //Hover Handler In //show the top bar dc_ce_show_bar( this ); //show and hide the mask dc_ce_show_mask( this ); }, function(){ //Hover Handler Out //hide the masks $('.dc-ce-mask').hide(); //hide the message $('#dc-ce-message-container').hide(); }); //functions -------------------------------------------------------------------------- function dc_ce_show_mask( element ){ var adv_width = $(element).width(); var adv_height = $(element).height(); var document_width = $(document).width(); var document_height = $(document).height(); var offset_top = $(element).offset().top + dc_ce_vertical_offset; var offset_left = $(element).offset().left + dc_ce_horizontal_offset; var offset_bottom = document_height - offset_top - adv_height; var offset_right = document_width - offset_left - adv_width; //set mask 1 position - top mask $('#dc-ce-mask-1').css('top', '0' ); $('#dc-ce-mask-1').css('left', '0' ); $('#dc-ce-mask-1').css('height', offset_top + 'px' ); $('#dc-ce-mask-1').css('width', document_width + 'px' ); //set mask 2 position - left mask $('#dc-ce-mask-2').css('top', offset_top + 'px' ); $('#dc-ce-mask-2').css('left', '0' ); $('#dc-ce-mask-2').css('height', adv_height + 'px' ); $('#dc-ce-mask-2').css('width', offset_left + 'px' ); //set mask 3 position - bottom mask $('#dc-ce-mask-3').css('top', offset_top + adv_height + 'px' ); $('#dc-ce-mask-3').css('left', '0' ); $('#dc-ce-mask-3').css('height', offset_bottom + 'px' ); $('#dc-ce-mask-3').css('width', document_width + 'px' ); //set mask 4 position - right mask $('#dc-ce-mask-4').css('top', offset_top ); $('#dc-ce-mask-4').css('left', offset_left + adv_width + 'px' ); $('#dc-ce-mask-4').css('height', adv_height + 'px' ); $('#dc-ce-mask-4').css('width', offset_right + 'px' ); //display the mask $('.dc-ce-mask').show(); } function dc_ce_show_bar( element ){ //check if ctr-message is available if( $(element).find(':first-child').hasClass('ctr-message') ){ //move the message from the placeholder to the real message div var message = $(element).find(':first-child').html(); $('#dc-ce-message').html(message); //display the top bar only if the top bar doesn't overlap the hovered advertising var window_offset_top = $(element).offset().top - $(window).scrollTop(); if( window_offset_top > parseInt( $('#dc-ce-message-container').css('height'), 10 ) ){ //display the bar $('#dc-ce-message-container').show(); } } }文件目录······
暂无数据
猜你喜欢
更多»
项目推荐
更多»
PDF电子书
更多»
Java多线程编程核心技术
(2)
Linux命令详解词典.pdf
(5)
深入Python3中文版
(0)
百度SEO一本通.pdf
(0)
mysql必知必会.pdf
(2)
疯狂JAVA讲义 pdf电子书
(3)
C# 图解教程pdf电子书
(3)
研磨设计模式 pdf电子书
(0)