Widget:RCSandbox: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
</style>
</style>
<script type="text/javascript">
<script type="text/javascript">
$('#changeslist').ready(function() {
$('#changeslist').ready(function () {
getRecentChanges();
    getRecentChanges();
scrolltextup(1000);
    scrolltextup(1000);
});
});
function getRecentChanges() {
function getRecentChanges() {
Line 28: Line 28:
         });
         });
     }
     }
    var scrollheight = $("#textup").height();
    function scrolltextup(dur) {
        $("#textup").animate({
            "top" : "-=20"
        }, {
            duration : dur,
            easing : "linear",
            complete : function () {
                $("#textup").children(":last").after("<div style='line-height:20px;'>" + $("#textup").children(":first").html() + "</div>");
                if ($("#textup").children(":first").height() <= (parseInt($("#textup").css("top")) * -1)) {
                    $("#textup").children(":first").remove();
                    $("#textup").css({
                        "top" : 0
                    });
                }
                setTimeout("scrolltextup(1000)", 1000);
             }
             }
 
         });
var scrollheight = $("#textup").height();
 
function scrolltextup(dur){
  $("#textup").animate({"top":"-=20"},{
    duration: dur,
    easing: "linear",
    complete:function(){
      $("#textup").children(":last").after("<div style='line-height:20px;'>"+
          $("#textup").children(":first").html()+"</div>");
      if($("#textup").children(":first").height() <=
          (parseInt($("#textup").css("top"))*-1)){
         $("#textup").children(":first").remove();
        $("#textup").css({"top":0});
      }
      setTimeout("scrolltextup(1000)", 1000);
     }
     }
  });
                    }
}
 
 


</script>
</script>

Revision as of 17:18, 20 August 2015