Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2fa0aa4f
authored
2020-11-03 17:16:36 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:办事指南
1 parent
3ee806de
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
staticJs/bszn.js
staticViews/bszn/index.html
staticJs/bszn.js
0 → 100644
View file @
2fa0aa4
layui
.
use
(
'element'
,
function
()
{
var
element
=
layui
.
element
;
});
layui
.
use
(
'element'
,
function
()
{
var
element
=
layui
.
element
;
//监听Tab切换,以改变地址hash值
element
.
on
(
'tab(navtab)'
,
function
()
{
if
(
this
.
getAttribute
(
'lay-id'
)
==
1
)
{
$
(
"body,html"
).
animate
({
scrollTop
:
$
(
".tudi"
).
offset
().
top
});
$
(
".online_business h2"
).
removeClass
(
'titleActive'
)
$
(
".tudi .online_business h2"
).
addClass
(
'titleActive'
)
}
else
if
(
this
.
getAttribute
(
'lay-id'
)
==
2
)
{
$
(
"body,html"
).
animate
({
scrollTop
:
$
(
".jianzhu"
).
offset
().
top
});
$
(
".online_business h2"
).
removeClass
(
'titleActive'
)
$
(
".jianzhu .online_business h2"
).
addClass
(
'titleActive'
)
}
else
if
(
this
.
getAttribute
(
'lay-id'
)
==
3
)
{
$
(
"body,html"
).
animate
({
scrollTop
:
$
(
".linmu"
).
offset
().
top
});
$
(
".online_business h2"
).
removeClass
(
'titleActive'
)
$
(
".linmu .online_business h2"
).
addClass
(
'titleActive'
)
}
else
if
(
this
.
getAttribute
(
'lay-id'
)
==
4
)
{
$
(
"body,html"
).
animate
({
scrollTop
:
$
(
".qita"
).
offset
().
top
});
$
(
".online_business h2"
).
removeClass
(
'titleActive'
)
$
(
".qita .online_business h2"
).
addClass
(
'titleActive'
)
}
else
{
$
(
"body,html"
).
animate
({
scrollTop
:
0
});
$
(
".online_business h2"
).
removeClass
(
'titleActive'
)
}
});
element
.
on
(
'tab(navtab1)'
,
function
()
{
if
(
this
.
getAttribute
(
'lay-id'
)
==
1
)
{
$
(
"body,html"
).
animate
({
scrollTop
:
$
(
".tudi1"
).
offset
().
top
});
$
(
".navtab1 h2"
).
removeClass
(
'titleActive'
)
$
(
".tudi1 .navtab1 h2"
).
addClass
(
'titleActive'
)
}
else
if
(
this
.
getAttribute
(
'lay-id'
)
==
2
)
{
$
(
"body,html"
).
animate
({
scrollTop
:
$
(
".jianzhu1"
).
offset
().
top
});
$
(
".navtab1 h2"
).
removeClass
(
'titleActive'
)
$
(
".jianzhu1 .navtab1 h2"
).
addClass
(
'titleActive'
)
}
else
if
(
this
.
getAttribute
(
'lay-id'
)
==
3
)
{
$
(
"body,html"
).
animate
({
scrollTop
:
$
(
".linmu1"
).
offset
().
top
});
$
(
".navtab1 h2"
).
removeClass
(
'titleActive'
)
$
(
".linmu1 .navtab1 h2"
).
addClass
(
'titleActive'
)
}
else
{
$
(
"body,html"
).
animate
({
scrollTop
:
0
});
$
(
".navtab1 h2"
).
removeClass
(
'titleActive'
)
}
});
});
layui
.
use
(
'util'
,
function
()
{
let
util
=
layui
.
util
;
//执行
util
.
fixbar
({
bar1
:
true
,
bar2
:
true
,
top
:
true
,
click
:
function
(
type
)
{
console
.
log
(
type
);
if
(
type
===
'bar1'
)
{
alert
(
'点击了bar1'
)
}
}
});
});
\ No newline at end of file
staticViews/bszn/index.html
View file @
2fa0aa4
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment