Widget:RCSandbox: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
$('#changeslist').load(function() { | |||
alert 'Hi'; | |||
}); | |||
function getRecentChanges(){ | function getRecentChanges(){ | ||
var api = new mw.Api(); | var api = new mw.Api(); | ||
Line 14: | Line 17: | ||
}}); | }}); | ||
} | } | ||
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(3000)", 500); | |||
} | |||
}); | |||
} | |||
</script> | </script> | ||
< | <div id="scrolltextup" style="border:1px ridge #004F72; overflow:hidden; | ||
position:relative; width:500px; height:20px;"> | |||
<div id="textup" style="text-align:center; position:absolute; top:0; | |||
left:0; width:500px;"> | |||
<div id="changeslist" style="line-height:20px;"> | |||
+++First Lorem ipsum dolor sit amet, consectetur adipiscing elit. | |||
+++Second Lorem ipsum dolor sit amet, consectetur adipiscing elit. | |||
</div> | |||
</div> | |||
</div> | |||
</includeonly> | </includeonly> |