$('#cab_doc').on('click',function () {
$.ajax({
type: 'POST',
url: 'ajax.php',
data: {
cab_doc: true
},
success: function(response) {
$('#contents').html(
response
);
$('#help_active,#api_doc_active').removeClass('dx-nav-active');
$('#cab_doc_active').addClass('dx-nav-active');
}
});
$.ajax({
type: 'POST',
url: 'ajax.php',
data: {
interaction_cab_doc: true
},
success: function(response) {
$('#interaction').html(
response
);
navMenuAPI(); // Меню с кнопками для языков
mobileNavMenu(); // Боковое меню
sideMenuScript(); // Боковое меню
colorNav();
}
});
});
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.2.245/',
CURLOPT_RETURNTRANSFER => true,
));
$response = curl_exec($myCurl);
$data = $_POST;
/*==============================================================================*/
// Меню
if ($data['interaction_api_doc'] == true){
require_once"menu/header_wrapper.php";
require_once"menu/nav_menu-api_doc.php";
require_once"menu/nav_menu_mobile-api_doc.php";
echo '
<div id="background">
<div class="background-actual"></div>
</div>
';
}
if ($data['interaction_cab_doc'] == true){
require_once"menu/nav_menu-cab_doc.php";
require_once"menu/nav_menu_mobile-cab_doc.php";
}
if ($data['interaction_help'] == true){
}
/*==============================================================================*/
function colorNav() {
// Подсветка текста при прокрутке
$(window).on("load",function(){
$("#documenter_nav a").mPageScroll2id({
layout:"auto",
offset:10,
highlightSelector:"#documenter_nav a"
});
});
}
<div id="documenter_sidebar">
<div id="scrollholder" class="scrollholder">
<div id="scroll" class="scroll">
<ol id="documenter_nav">
<li><a class="nav-link" href="#documenter-1"><i class="far fa-check-circle"></i> name</a></li>
<li><a class="nav-link" href="#documenter-2"><i class="far fa-comment-dots"></i> name</a></li>
<li><a class="nav-link" href="#documenter-3"><i class="fas fa-clipboard-check"></i> name</a></li>
<li><a class="nav-link" href="#documenter-4"><i class="fas fa-file-invoice-dollar"></i> name</a></li>
<li>
<a class="nav-link" href="#documenter-5"><i class="fas fa-sms"></i> name</a>
<li><a class="nav-link ml-3 my-1" href="#documenter-5-1"> name</a></li>
<li><a class="nav-link ml-3 my-1" href="#documenter-5-1-1"> name</a></li>
<li><a class="nav-link ml-3 my-1" href="#documenter-5-2"> name</a></li>
<li><a class="nav-link ml-3 my-1" href="#documenter-5-2-1"> name</a></li>
</li>
</ol>
</div>
</div>
</div>
$('#cab_doc').on('click',function () {
$.ajax({
type: 'POST',
url: 'ajax.php',
data: {
cab_doc: true
},
success: function(response) {
$('#contents').html(
response
);
$('#help_active,#api_doc_active').removeClass('dx-nav-active');
$('#cab_doc_active').addClass('dx-nav-active');
$.ajax({
type: 'POST',
url: 'ajax.php',
data: {
interaction_cab_doc: true
},
success: function(response) {
$('#interaction').html(
response
);
navMenuAPI(); // Меню с кнопками для языков
mobileNavMenu(); // Боковое меню
sideMenuScript(); // Боковое меню
colorNav();
}
});
}
});
});