BBnepal-Accounts/application/views/teacher/teacher-footer.php
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

54 lines
1.4 KiB
PHP

<script src="<?php echo base_url(); ?>assets_teacher/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets_teacher/js/bootstrap.min.js"></script>
<script defer src="<?php echo base_url(); ?>assets_teacher/js/all.js"></script>
<script defer src="<?php echo base_url(); ?>assets_teacher/js/main.js"></script>
<script src="<?php echo base_url(); ?>assets_teacher/owl-carousel/js/owl.carousel.min.js"></script>
<script>
$(document).ready(function() {
$(function() {
let url = window.location.href.toLowerCase();
let flag = false;
let Clickedurl;
$('ul#nav_list li').removeClass('active');
$('ul#nav_list li a').each(function() {
Clickedurl = $(this).attr('href').toLowerCase();
if (url == Clickedurl) {
console.log(url, Clickedurl)
flag = true;
let liParent = $(this).parent();
liParent.addClass('active');
$.ajax({
url: '<?php echo base_url() ?>teacher/update_link_active',
data: {
link: url
},
type: 'POST',
async: false,
success: function(data) {}
});
}
});
if (flag == false) {
Clickedurl = '<?php echo isset($_SESSION['active_old_link']) ? $_SESSION['active_old_link'] : 0 ?>';
$('ul#nav_list li a').each(function() {
if ($(this).attr('href') == Clickedurl) {
let liParent = $(this).parent();
liParent.addClass('active');
}
});
}
})
});
</script>
</body>
</html>