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

54 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id="floatpoint" class="course_ad" >
<table border=0>
<tr>
<td align=center bgcolor=#15bccf >
<span class="ad_title"><%= l(:label_contact_us) %></span>
</td>
</tr>
<tr><td><p class="ad_content"><%= l(:label_course_ad_description) %></p></td></tr>
<tr>
<td align=center bgcolor="#ececec" >
<%= l(:label_course_adcolick) %><a href="http://user.trustie.net/users/12/user_newfeedback">黄井泉</a><br>
</td>
</tr>
<tr>
<td align=center bgcolor="#ececec" >
Tel:15388083362<br>
</td>
<tr>
<td align=center bgcolor="#ececec" >
<%= l(:label_course_adcolick) %><a href="http://user.trustie.net/users/6/user_newfeedback">王林春</a><br>
</td>
</tr>
<tr>
<td align=center bgcolor="#ececec" >
Tel:13467631747<br>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var xstep=1; // 移动步长此参数越小移动越平滑最小值为1
var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快
var YY=0;
window.setInterval(function(){move();},delay_time);
function move()
{
var screen_height = $(window).height(); //浏览器当前窗口文档的高度
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("margin-top",YY);
}
function change_size(){var screen_width = $(window).width();var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10).css("position", "fixed");}
$(document).ready(function(){change_size();});
$(window).resize(function(){change_size();});
</script>