/
component-demo-visitdetails.js
37 lines (37 loc) · 1.12 KB
/
component-demo-visitdetails.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(function ($) {
var refreshExperincePanel = function () {
var panel = $("#experiencedata");
$.ajax(
{
url: "/api/Demo/ExperienceDataContent",
method: "get",
cache: false,
success: function (data) {
panel.replaceWith(data);
$("#sidebar").find('.panel-collapse').hide();
}
});
};
$(function () {
$(".refresh-sidebar")
.click(function () {
$(this).fadeOut();
refreshExperincePanel();
$(this).fadeIn();
});
$(".end-visit")
.click(function () {
$(this).fadeOut();
$.ajax(
{
url: "/api/Demo/EndVisit",
method: "get",
cache: false,
success: function () {
refreshExperincePanel();
}
});
$(this).fadeIn();
});
});
})(jQuery);