105 lines
4.1 KiB
JavaScript
105 lines
4.1 KiB
JavaScript
|
$(function(){
|
|||
|
$("#lb-s-now").load('/mini_page/11');
|
|||
|
$("a.ancLinks").click(function(){
|
|||
|
var elementClick=$(this).attr("href");
|
|||
|
var destination=$(elementClick).offset().top;
|
|||
|
$('html,body').animate({
|
|||
|
scrollTop:destination
|
|||
|
},3000);
|
|||
|
return false;
|
|||
|
});
|
|||
|
$("button").click(function(event){
|
|||
|
var link=$(this).data('link');
|
|||
|
var ajax=$(this).data('ajax');
|
|||
|
var txt=$(this).data('txt');
|
|||
|
var modalid=$(this).data('modal');
|
|||
|
if (modalid)$('#' + modalid).modal('show');
|
|||
|
if(link){
|
|||
|
document.location.href=link;
|
|||
|
}if(ajax){
|
|||
|
$.ajax({
|
|||
|
type:"POST",
|
|||
|
url:ajax,
|
|||
|
data:"txt="+txt
|
|||
|
})
|
|||
|
}
|
|||
|
})
|
|||
|
|
|||
|
$("#soc_btn a").click(function(event){
|
|||
|
var title=$("#soc_btn").attr('title');
|
|||
|
var ss=$(this).data('ss');
|
|||
|
var decription=$("#soc_btn").data('decription');
|
|||
|
var url=$("#soc_btn").data('url');
|
|||
|
var img=$("#soc_btn").data('img');
|
|||
|
switch(ss){
|
|||
|
case'vk.com':window.open('//vk.com/share.php?url=http://b-install-nt.ru&title='+title+'&description='+decription+'&image='+img,'_blank','scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=550, height=440, toolbar=0, status=0');
|
|||
|
break;
|
|||
|
case'ok.ru':window.open('//ok.ru/dk?st.cmd=addShare&st._surl='+url+'&title='+title,'_blank','scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=550, height=440, toolbar=0, status=0');
|
|||
|
break;
|
|||
|
case'facebook.com':window.open('//www.facebook.com/sharer/sharer.php?u='+url,'_blank','scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=550, height=440, toolbar=0, status=0');
|
|||
|
break;
|
|||
|
case'mail.ru':window.open('//connect.mail.ru/share?url='+url+'&title='+title+'&description='+decription+'&imageurl='+img,'_blank','scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=550, height=440, toolbar=0, status=0');
|
|||
|
break;
|
|||
|
case'google.com':window.open('//plus.google.com/share?url='+url,'_blank','scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=550, height=440, toolbar=0, status=0');
|
|||
|
break;
|
|||
|
}return false;
|
|||
|
})
|
|||
|
|
|||
|
$('#div_administracia').load('/mini_page/11');
|
|||
|
$('#reyt_page').load('/reyt_page/');
|
|||
|
|
|||
|
$("#form_find_click").click(function(event){$("#form_find").submit();})
|
|||
|
|
|||
|
|
|||
|
//костыль для сведений об образовательной организации
|
|||
|
var status_oo = localStorage.getItem('status-oo');
|
|||
|
if (status_oo=="1"){
|
|||
|
$("#p_sved_oo").data("status", "1");
|
|||
|
$("#mini-page-3").load("/mini_page/3");
|
|||
|
$("#mini-page-3").removeClass("hidden");
|
|||
|
$("#strela-3").removeClass("fa-angle-right");
|
|||
|
$("#strela-3").addClass("fa-angle-down");
|
|||
|
}
|
|||
|
|
|||
|
$(".show_mini_page").click(function(event){
|
|||
|
var target = $(this).data("target");
|
|||
|
var link = $(this).data("page");
|
|||
|
var status= $(this).data("status");//0 - свернуто, 1 - развернуто
|
|||
|
if (status==0){
|
|||
|
$(this).data("status", "1");
|
|||
|
localStorage.setItem('status-oo', '1');
|
|||
|
$("#mini-page-" + target).load(link);
|
|||
|
$("#mini-page-" + target).removeClass("hidden");
|
|||
|
$("#strela-" + target).removeClass("fa-angle-right");
|
|||
|
$("#strela-" + target).addClass("fa-angle-down"); //<i class="fas fa-angle-down"></i>
|
|||
|
}else{
|
|||
|
$(this).data("status", "0");
|
|||
|
localStorage.setItem('status-oo', '0');
|
|||
|
$("#mini-page-" + target).addClass("hidden");
|
|||
|
$("#strela-" + target).addClass("fa-angle-right");
|
|||
|
$("#strela-" + target).removeClass("fa-angle-down"); //<i class="fas fa-angle-down"></i>
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
})
|
|||
|
|
|||
|
|
|||
|
$(".lazy").lazyload({ placeholder : "/img/grey.gif", effect : "fadeIn", failure_limit : 2, threshold : 10 });
|
|||
|
$.scrollUp({
|
|||
|
scrollName: 'scrollUp',
|
|||
|
topDistance: '300',
|
|||
|
topSpeed: 300,
|
|||
|
animation: 'fade',
|
|||
|
animationInSpeed: 200,
|
|||
|
animationOutSpeed: 200,
|
|||
|
scrollText: 'Вверх',
|
|||
|
activeOverlay: false,
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
/* автоматическое присвоение классов */
|
|||
|
$("table").addClass("table");
|
|||
|
});
|