Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h2 class="o_hidden assessment-title">
- <span class="left">Individual Writing Assessment Class Record</span>
- </h2>
- <div class="report-container">
- <table class="report-ss individual-writing-assessment" style="width:100%">
- <thead>
- <tr>
- <th class="to_the_center title-row fixed-column" rowspan="2">Student Name</th>
- <th colspan="{{assessmentsCount}}" class="to_the_center title-row">Overall Unit Score</th>
- </tr>
- <tr>
- {{#assessments}}
- <th class="ten">{{name}}</th>
- {{/assessments}}
- </tr>
- </thead>
- <tbody>
- {{#students}}
- <tr>
- <td class="student">{{name}}</td>
- {{#scores}}
- <td>{{score}} {{assessmentTotal}}</td>
- {{/scores}}
- </tr>
- {{/students}}
- </tbody>
- </table>
- </div>
- <script type="text/javascript">
- ;(function($) {
- $.fn.fixMe = function() {
- return this.each(function() {
- var $this = $(this),
- $t_fixed;
- function init() {
- $this.wrap('<div class="container" />');
- $t_fixed = $this.clone();
- $t_fixed.find("tbody").remove().end().addClass("fixed").insertBefore($this);
- resizeFixed();
- }
- function resizeFixed() {
- $t_fixed.find("th").each(function(index) {
- $(this).css("width",$this.find("th").eq(index).width()+1+"px");
- });
- }
- function scrollFixed() {
- var offset = $(this).scrollTop(),
- tableOffsetTop = $this.offset().top,
- tableOffsetBottom = tableOffsetTop + $this.height() - $this.find("thead").height();
- if(offset < tableOffsetTop || offset > tableOffsetBottom)
- $t_fixed.hide();
- else if(offset >= tableOffsetTop && offset <= tableOffsetBottom && $t_fixed.is(":hidden")){
- $t_fixed.show();
- }
- $t_fixed.css('top', offset);
- }
- $(window).resize(resizeFixed);
- $(window).scroll(scrollFixed);
- $(window).touchmove(scrollFixed);
- init();
- });
- };
- })(jQuery);
- $(document).ready(function(){
- $("table").fixMe();
- $(".up").click(function() {
- $('html, body').animate({
- scrollTop: 0
- }, 2000);
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement