Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dic-global-dev
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Manzar Hussain
dic-global-dev
Commits
681f5f64
Commit
681f5f64
authored
Dec 31, 2020
by
Manzar Hussain
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-theme' into 'develop'
add sticky js See merge request manzarH/dic-global-dev!178
parents
9b01216c
20792b60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
4 deletions
+43
-4
override.js
themes/custom/envigo/js/override.js
+43
-4
No files found.
themes/custom/envigo/js/override.js
View file @
681f5f64
...
@@ -92,6 +92,45 @@
...
@@ -92,6 +92,45 @@
});
});
$
(
"#simplenews-subscriptions-block-226b1abd-464c-4b6e-b0d2-301af005f689 input"
).
attr
(
'placeholder'
,
'Enter your email'
);
$
(
"#simplenews-subscriptions-block-226b1abd-464c-4b6e-b0d2-301af005f689 input"
).
attr
(
'placeholder'
,
'Enter your email'
);
$
(
"#edit-subscribe"
).
html
(
'Submit'
);
$
(
"#edit-subscribe"
).
html
(
'Submit'
);
})(
jQuery
);
\ No newline at end of file
var
$sticky
=
$
(
'.sticky'
);
var
$stickyrStopper
=
$
(
'.sticky-stopper'
);
if
(
$sticky
.
offset
())
{
var
generalSidebarHeight
=
$sticky
.
innerHeight
();
var
stickyTop
=
$sticky
.
offset
().
top
;
var
stickOffset
=
0
;
var
stickyStopperPosition
=
$stickyrStopper
.
offset
().
top
;
//console.log(stickyStopperPosition);
console
.
log
(
generalSidebarHeight
)
var
stopPoint
=
stickyStopperPosition
-
generalSidebarHeight
-
stickOffset
;
var
diff
=
stopPoint
+
stickOffset
;
console
.
log
(
stickyTop
)
$
(
window
).
scroll
(
function
(){
var
windowTop
=
$
(
window
).
scrollTop
();
var
windowWidth
=
$
(
window
).
width
();
/* var innerWidth = $('.fixedHeadercontainer').innerHeight();
innerWidth = innerWidth + 30; */
if
(
windowWidth
>
767
)
{
if
(
stopPoint
<
windowTop
)
{
$sticky
.
css
({
position
:
'relative'
,
top
:
'100%'
,
'margin-top'
:
-
(
generalSidebarHeight
+
70
)});
}
else
if
(
stickyTop
<
windowTop
+
stickOffset
)
{
$sticky
.
css
({
position
:
'fixed'
,
top
:
stickOffset
,
'margin-top'
:
0
});
}
else
{
$sticky
.
css
({
position
:
'absolute'
,
top
:
'initial'
,
'margin-top'
:
0
});
}
}
});
}
$
(
".subheadings-list li a"
).
on
(
"click"
,
function
(
event
)
{
event
.
preventDefault
();
var
dataContent
=
$
(
this
).
attr
(
'page-event'
);
var
b
=
$
(
'.ba_r_i_w'
).
find
(
'.'
+
dataContent
);
var
a
=
b
.
offset
().
top
;
$
(
"html, body"
).
animate
({
scrollTop
:
a
},
700
);
});
})(
jQuery
);
\ No newline at end of file
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