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.
32 lines
1.1 KiB
32 lines
1.1 KiB
6 years ago
|
layui.use('jquery', function () {
|
||
|
var $ = layui.jquery;
|
||
|
var $pageFrame = $('#pageFrame');
|
||
|
var $selectLi = null;
|
||
|
$('.left-nav').on('click', 'li', function (event) {
|
||
|
var $tagLi = $(this);
|
||
|
var $tagA = $tagLi.find('a').eq(0);
|
||
|
var href = $tagA.prop('href');
|
||
|
if (href) {
|
||
|
$pageFrame.prop('src', href + '?q=' + new Date().getTime());
|
||
|
if ($selectLi) {
|
||
|
$selectLi.removeClass('active')
|
||
|
}
|
||
|
$selectLi = $tagLi.addClass('active');
|
||
|
}
|
||
|
return false;
|
||
|
});
|
||
|
|
||
|
$('.container .left_open i').click(function(event) {
|
||
|
if($('.left-nav').css('left')=='0px'){
|
||
|
$('.left-nav').animate({left: '-221px'}, 100);
|
||
|
$('.page-content').animate({left: '0px'}, 100);
|
||
|
$('.page-content-bg').hide();
|
||
|
}else{
|
||
|
$('.left-nav').animate({left: '0px'}, 100);
|
||
|
$('.page-content').animate({left: '221px'}, 100);
|
||
|
if($(window).width()<768){
|
||
|
$('.page-content-bg').show();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
});
|