맨위로 가는 애드온이 안되서요.

  • 미스터강
  • 2015.02.10 23:10:21
  • 0

https://www.xpressengine.com/index.php?mid=download&package_id=21842038


이 애드온 사용중인데 window 부분만 '#content-wrapper' 이걸로 수정해서 사용중인데요.


버튼은 표시 되는데 맨위로 가는게 적용안되네요 뭐가 틀린걸까요?


<?php

/**

* @file scrolltopcontrol.addon.php

* @author Sulli (admin@admin.kr)

* @brief scrolltopcontrol

**/


if(!defined("__XE__")) exit();

if($called_position == 'before_module_proc') {


Context::addCSSFile("./addons/scrolltopcontrol/css/scrolltopcontrol.css", false);

$startline = $addon_info->startline;

if (empty($startline))$startline = '100';

$scrollduration = $addon_info->scrollduration;

if (empty($scrollduration))$scrollduration = '1000';

$to_top = "

<script type='text/javascript'>

jQuery(function($){

$('#scrolltotop').hide();

$(function () {

$('#content-wrapper').scroll(function () {

if ($(this).scrollTop() > {$startline}) {

$('#scrolltotop').fadeIn();

} else {

$('#scrolltotop').fadeOut();

}

});

$('#scrolltotop a').click(function () {

$('body,html').animate({

scrollTop: 0

}, {$scrollduration});

return false;

});

});

});

</script>

<div id=\"scrolltotop\"><a href=\"#top\"><span></span></a></div>

";

Context::addHtmlFooter($to_top);

}

?>

태그목록

  • 없음

첨부파일 목록

  • 없음
목록으로 돌아가기
댓글 쓰기