socialforge/app/views/courses/_course_ad.html.erb

55 lines
2.2 KiB
Plaintext
Raw Normal View History

2014-11-14 16:38:14 +08:00
2014-11-17 15:21:36 +08:00
<div id="floatpoint" class="course_ad" >
2014-11-18 10:29:00 +08:00
<table border=0>
2014-11-14 16:38:14 +08:00
<tr>
2014-11-17 15:21:36 +08:00
<td align=center bgcolor=#15bccf >
<span class="ad_title"><%= l(:label_contact_us) %></span>
2014-11-14 16:38:14 +08:00
</td>
</tr>
2014-11-17 15:21:36 +08:00
<tr><td><p class="ad_content"><%= l(:label_course_ad_description) %></p></td></tr>
2014-11-14 16:38:14 +08:00
<tr>
2014-11-17 15:21:36 +08:00
<td align=center bgcolor="#ececec" >
2014-11-17 15:48:05 +08:00
<%= l(:label_course_adcolick) %><a href="http://user.trustie.net/users/12/user_newfeedback">黄井泉</a><br>
2014-11-14 16:38:14 +08:00
</td>
</tr>
<tr>
2014-11-17 15:21:36 +08:00
<td align=center bgcolor="#ececec" >
Tel:15388083362<br>
</td>
<tr>
<td align=center bgcolor="#ececec" >
2014-11-17 15:48:05 +08:00
<%= l(:label_course_adcolick) %><a href="http://user.trustie.net/users/6/user_newfeedback">王林春</a><br>
2014-11-17 15:21:36 +08:00
</td>
</tr>
<tr>
<td align=center bgcolor="#ececec" >
Tel:13467631747<br>
2014-11-14 16:38:14 +08:00
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var xstep=1; // 移动步长此参数越小移动越平滑最小值为1
var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快
var YY=0;
2014-11-18 10:29:00 +08:00
var screen_height = $(window).height(); //浏览器当前窗口文档的高度
var screen_width = $(window).width(); //浏览器当前窗口文档的宽度
window.setInterval(function(){move();},delay_time);
function move()
{
var floatpoint_height = $("#floatpoint").height();
YY += xstep;
if(YY <= 0){xstep = 1; YY = 0;} //如果浮动层超出了上界,则设定移动方向为向下;并设定层的位置为正好在上界处
if(YY >= (screen_height-floatpoint_height)) //如果浮动层超出了下界,则设定移动方向为向上;并设定层的位置为正好在下界处
{
xstep = -1;
YY=(screen_height-floatpoint_height);
}
$("#floatpoint").css("top",YY);
}
function change_size(){var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10);}
$(document).ready(function(){change_size();});
$(window).resize(function(){screen_width = $(window).width();change_size();});
2014-11-14 16:38:14 +08:00
</script>