﻿(function (a) { latestfb = function () { function d(b) { a("div.cfb div.c2 div.item").hide(); b.fadeOut("fast", function (b) { return function () { b.fadeIn("slow", function () { var e = a("div.cfb div.c2 div.item:last").attr("title"); if (a(this).attr("title") == e) { setTimeout(function () { c(20); var b = a("div.cfb div.c2 div.item:first"); if (e == 1) { b = a("div.cfb div.c2 div.item:nth-child(2)") } d(b) }, 1e4) } else { setTimeout(function () { d(a(b.next())) }, 1e4) } }) } } (b)) } function c(c) { a("div.cfb div.c2").empty(); var d = ""; var e = b(c); a.each(e, function (a, b) { var c = e[a].Id; var f = e[a].NamePublished; var g = e[a].NotesPublished; var h = e[a].DateAdded; d += "<div class='item' title='" + a + "'>"; d += "<p class='name'>" + f + "</p>"; d += '<p class="msg">"' + g + '"</p>'; d += "</div>" }); a("div.cfb div.c2").append(d) } function b(b) { var c; var d = { count: b }; a.ajax({ type: "GET", url: "WebServices/Feedback.svc/SelectLatest", data: d, dataType: "json", contentType: "application/json; charset=utf-8", async: false, cache: false, success: function (a) { c = a.SelectLatestResult } }); return c } var e = a("div.cfb div.c2 div.item:first"); d(e) } })(jQuery)
