右上角导航栏问题
This commit is contained in:
parent
66c1dfa77e
commit
b6e123e476
|
@ -101,10 +101,7 @@
|
||||||
addSlipMenu();
|
addSlipMenu();
|
||||||
addProjectSlipMenu ();
|
addProjectSlipMenu ();
|
||||||
addCourseSlipMenu();
|
addCourseSlipMenu();
|
||||||
});
|
$('.sub_menu').find("a").attr('target', '_blank');
|
||||||
|
|
||||||
jQuery(document).ready(function($) {
|
|
||||||
$('.sub_menu').find("a").attr('target', '_blank');
|
|
||||||
$('.project_sub_menu').find("a").attr('target', '_blank');
|
$('.project_sub_menu').find("a").attr('target', '_blank');
|
||||||
$('.course_sub_menu').find("a").attr('target', '_blank');
|
$('.course_sub_menu').find("a").attr('target', '_blank');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
function addSlipMenu () {
|
function addSlipMenu () {
|
||||||
var loggedas = $('#current_user_li:first');
|
var loggedas = $('#current_user_li a:first');
|
||||||
var sub_menu = $('#user_sub_menu');
|
var sub_menu = $('#user_sub_menu');
|
||||||
loggedas.mouseenter(function(event) {
|
loggedas.mouseenter(function() {
|
||||||
sub_menu.show();
|
sub_menu.show();
|
||||||
|
$('#my_projects_ul').hide();
|
||||||
|
$('#my_courses_ul').hide();
|
||||||
});
|
});
|
||||||
sub_menu.mouseleave(function(event) {
|
sub_menu.mouseleave(function() {
|
||||||
sub_menu.hide();
|
sub_menu.hide();
|
||||||
|
$('#my_projects_ul').hide();
|
||||||
|
$('#my_courses_ul').hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,24 +17,26 @@ function addProjectSlipMenu () {
|
||||||
var loggedas = $('#my_projects_li');
|
var loggedas = $('#my_projects_li');
|
||||||
var project_sub_menu = $('#my_projects_ul');
|
var project_sub_menu = $('#my_projects_ul');
|
||||||
var course_sub_menu = $('#my_courses_ul');
|
var course_sub_menu = $('#my_courses_ul');
|
||||||
loggedas.mouseenter(function(event) {
|
loggedas.mouseenter(function() {
|
||||||
course_sub_menu.hide();
|
course_sub_menu.hide();
|
||||||
project_sub_menu.show();
|
project_sub_menu.show();
|
||||||
});
|
});
|
||||||
loggedas.mouseleave(function(event) {
|
loggedas.mouseleave(function() {
|
||||||
project_sub_menu.hide();
|
project_sub_menu.hide();
|
||||||
|
course_sub_menu.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function addCourseSlipMenu () {
|
function addCourseSlipMenu () {
|
||||||
var loggedas = $('#my_courses_li');
|
var loggedas = $('#my_courses_li');
|
||||||
var project_sub_menu = $('#my_projects_ul');
|
var project_sub_menu = $('#my_projects_ul');
|
||||||
var course_sub_menu = $('#my_courses_ul');
|
var course_sub_menu = $('#my_courses_ul');
|
||||||
loggedas.mouseenter(function(event) {
|
loggedas.mouseenter(function() {
|
||||||
project_sub_menu.hide();
|
project_sub_menu.hide();
|
||||||
course_sub_menu.show();
|
course_sub_menu.show();
|
||||||
});
|
});
|
||||||
loggedas.mouseleave(function(event) {
|
loggedas.mouseleave(function() {
|
||||||
course_sub_menu.hide();
|
course_sub_menu.hide();
|
||||||
|
project_sub_menu.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue