You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
939 B
37 lines
939 B
$(function() {
|
|
$("a#single_image").fancybox();
|
|
setInterval(function(){
|
|
if(!window.achievement_in_work){
|
|
resee_materials()
|
|
}
|
|
}, 200000);
|
|
});
|
|
|
|
function resee_materials() {
|
|
for(var index in window.materials){
|
|
check_jactive(window.materials[index]);
|
|
}
|
|
}
|
|
|
|
function check_jactive(id) {
|
|
var url = location.protocol + '//'+ location.host + '/journals/';
|
|
if (window.material_type == 'H'){
|
|
url += 'check_exists_jhomework/'
|
|
} else if (window.material_type == 'E'){
|
|
url = 'check_exists_jexam/'
|
|
}
|
|
$.ajax({
|
|
type: 'GET',
|
|
url: url,
|
|
data: {'id': id},
|
|
success: function(data){
|
|
if (data['code'] != '1'){
|
|
hide_element(id)
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function hide_element(id) {
|
|
$('a[name='+id+']').fadeOut('slow');
|
|
} |