var comment_list = ""; var comment_page = 1; /* Util function that gets called to trigger animated search results */ function animResult(count) { $("#comment_container_"+count).fadeIn(350) } function commentSubmit(form) { if (form.comment.value == "") { alert("Please enter your comment."); return false; } else if (form.author.value == "") { alert("Please enter your name."); return false; } else { form.submit; } } function flagComment(id) { $("#report_abuse_form_"+id).submit(); } $(document).ready(function(){ function updatePaginationStats() { num_pages = Math.floor(comment_list.length / comment_per_page) + 1; if (comment_list.length / comment_per_page == Math.round(num_pages)) num_pages--; $text = "Page "+comment_page+" of " + num_pages; if (comment_list.length < comment_per_page) { $("#comment_prev_next_container").html(""); } else { $("#comment_prev_next_container").css("display", "block"); $("#comment_pagination_nav_container").css("display", "block"); $("#comment_pagination").html($text); } } function displaySearchResults() { $("#comment_list_container").html(""); // Iterate through array of results to build out a list var num_videos = comment_list.length; var this_url = window.location.href; var search_results = ''; num_display_videos = Math.min(comment_per_page, (num_videos - comment_offset)) // Loop through the videos and display them for (count = comment_offset; count < (num_display_videos + comment_offset); count++) { row = comment_list[count]; // Build the row var video = "
";
video += '