%PDF- %PDF-
| Direktori : /disk/www/wwwroot/test-lingceed.echineselearning.biz/js/ |
| Current File : /disk/www/wwwroot/test-lingceed.echineselearning.biz/js/bootstrap.eclmenu.js |
$(function() {
$('.caret-hidden-close').each(function() {
$(this).parent().click(function(e) {
$(this).find('.caret-hidden-close').toggle();
});
});
var _ismobile_ecl = /(iPhone|Android|iPad)/i.test(navigator.userAgent)
// _ismobile_ecl = true; // 测试用
if (_ismobile_ecl){
$('.ecl-menu').each(function() {
$(this).click(function(e) {
var targetId = $(this).attr('ecl-data-target');
if (targetId != '') {
$(this).toggleClass('daohang-current');
$(targetId).toggle();
$('.ecl-dropdown').each(function() {
if (targetId != ('#' + $(this).attr('id'))) {
$(this).hide();
}
});
} else {
$('.daohang-current').removeClass('daohang-current');
$('.ecl-dropdown').hide();
}
e.stopPropagation();
});
});
} else {
$('.ecl-menu-pc').hover(function() {
$(this).addClass('daohang-current');
var targetId = $(this).attr('ecl-data-target');
if (targetId != '') {
$(targetId).show();
$('.ecl-dropdown').each(function() {
if (targetId != ('#' + $(this).attr('id'))) {
$(this).hide();
}
});
} else {
$('.ecl-dropdown').hide();
}
}, function() {
$('.ecl-dropdown').hide();
$('.daohang-current').removeClass('daohang-current');
});
}
$('#more_mobile_h').click(function(e) {
$('#more_mobile_h').toggleClass('navbar-default-dianji-h');
});
$('.ecl-close-more').click(function(e) {
if ($('#more_mobile_h').hasClass('navbar-default-dianji-h')) {
$('#more_mobile_h').click();
}
});
$("body").click(function(){
$(".ecl-dropdown").hide();
$('.daohang-current').removeClass('daohang-current');
});
});