Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
news
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sartika Aritonang
news
Commits
2a4e2cf5
Commit
2a4e2cf5
authored
4 years ago
by
Sartika Aritonang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
8e6a8ea6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
clean-blog.js
project/static/result_design/js/clean-blog.js
+41
-0
No files found.
project/static/result_design/js/clean-blog.js
0 → 100644
View file @
2a4e2cf5
(
function
(
$
)
{
"use strict"
;
// Start of use strict
// Floating label headings for the contact form
$
(
"body"
).
on
(
"input propertychange"
,
".floating-label-form-group"
,
function
(
e
)
{
$
(
this
).
toggleClass
(
"floating-label-form-group-with-value"
,
!!
$
(
e
.
target
).
val
());
}).
on
(
"focus"
,
".floating-label-form-group"
,
function
()
{
$
(
this
).
addClass
(
"floating-label-form-group-with-focus"
);
}).
on
(
"blur"
,
".floating-label-form-group"
,
function
()
{
$
(
this
).
removeClass
(
"floating-label-form-group-with-focus"
);
});
// Show the navbar when the page is scrolled up
var
MQL
=
992
;
//primary navigation slide-in effect
if
(
$
(
window
).
width
()
>
MQL
)
{
var
headerHeight
=
$
(
'#mainNav'
).
height
();
$
(
window
).
on
(
'scroll'
,
{
previousTop
:
0
},
function
()
{
var
currentTop
=
$
(
window
).
scrollTop
();
//check if user is scrolling up
if
(
currentTop
<
this
.
previousTop
)
{
//if scrolling up...
if
(
currentTop
>
0
&&
$
(
'#mainNav'
).
hasClass
(
'is-fixed'
))
{
$
(
'#mainNav'
).
addClass
(
'is-visible'
);
}
else
{
$
(
'#mainNav'
).
removeClass
(
'is-visible is-fixed'
);
}
}
else
if
(
currentTop
>
this
.
previousTop
)
{
//if scrolling down...
$
(
'#mainNav'
).
removeClass
(
'is-visible'
);
if
(
currentTop
>
headerHeight
&&
!
$
(
'#mainNav'
).
hasClass
(
'is-fixed'
))
$
(
'#mainNav'
).
addClass
(
'is-fixed'
);
}
this
.
previousTop
=
currentTop
;
});
}
})(
jQuery
);
// End of use strict
This diff is collapsed.
Click to expand it.
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