Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
6ceb0909
Commit
6ceb0909
authored
Jul 09, 2017
by
naan1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加菜单点击高亮不会消失的效果
parent
f74f3b56
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/main/webapp/static/js/contabs.js
+3
-0
src/main/webapp/static/js/hplus.js
+5
-0
No files found.
src/main/webapp/static/js/contabs.js
View file @
6ceb0909
...
@@ -169,6 +169,7 @@ $(function () {
...
@@ -169,6 +169,7 @@ $(function () {
if
(
$
(
this
).
parents
(
'.J_menuTab'
).
next
(
'.J_menuTab'
).
size
())
{
if
(
$
(
this
).
parents
(
'.J_menuTab'
).
next
(
'.J_menuTab'
).
size
())
{
var
activeId
=
$
(
this
).
parents
(
'.J_menuTab'
).
next
(
'.J_menuTab:eq(0)'
).
data
(
'id'
);
var
activeId
=
$
(
this
).
parents
(
'.J_menuTab'
).
next
(
'.J_menuTab:eq(0)'
).
data
(
'id'
);
highLightMenuItem
(
activeId
);
//高亮对应的tab菜单
$
(
this
).
parents
(
'.J_menuTab'
).
next
(
'.J_menuTab:eq(0)'
).
addClass
(
'active'
);
$
(
this
).
parents
(
'.J_menuTab'
).
next
(
'.J_menuTab:eq(0)'
).
addClass
(
'active'
);
$
(
'.J_mainContent .J_iframe'
).
each
(
function
()
{
$
(
'.J_mainContent .J_iframe'
).
each
(
function
()
{
...
@@ -218,6 +219,7 @@ $(function () {
...
@@ -218,6 +219,7 @@ $(function () {
return
false
;
return
false
;
}
}
});
});
highLightMenuItem
(
activeId
);
//高亮对应的tab菜单
}
}
}
}
// 当前元素不处于活动状态
// 当前元素不处于活动状态
...
@@ -260,6 +262,7 @@ $(function () {
...
@@ -260,6 +262,7 @@ $(function () {
function
activeTab
()
{
function
activeTab
()
{
if
(
!
$
(
this
).
hasClass
(
'active'
))
{
if
(
!
$
(
this
).
hasClass
(
'active'
))
{
var
currentId
=
$
(
this
).
data
(
'id'
);
var
currentId
=
$
(
this
).
data
(
'id'
);
highLightMenuItem
(
currentId
);
//高亮对应的tab菜单
// 显示tab对应的内容区
// 显示tab对应的内容区
$
(
'.J_mainContent .J_iframe'
).
each
(
function
()
{
$
(
'.J_mainContent .J_iframe'
).
each
(
function
()
{
if
(
$
(
this
).
data
(
'id'
)
==
currentId
)
{
if
(
$
(
this
).
data
(
'id'
)
==
currentId
)
{
...
...
src/main/webapp/static/js/hplus.js
View file @
6ceb0909
...
@@ -122,6 +122,11 @@ function clearTabMenuItem(){
...
@@ -122,6 +122,11 @@ function clearTabMenuItem(){
});
});
}
}
function
highLightMenuItem
(
hrefVal
){
clearTabMenuItem
();
$
(
"a[href='"
+
hrefVal
+
"']"
).
addClass
(
"tab-menu-selected"
);
}
function
NavToggle
()
{
function
NavToggle
()
{
$
(
'.navbar-minimalize'
).
trigger
(
'click'
);
$
(
'.navbar-minimalize'
).
trigger
(
'click'
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment