Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_wcms_ohana
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_wcms_ohana
Commits
9f22be09
Commit
9f22be09
authored
1 day ago
by
Martin Leblanc
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5650: Add previous next button scope per carousel
parent
7bfe0f06
No related branches found
No related tags found
1 merge request
!273
Feature/istwcms 5650 m26lebla owl carousel replacement
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/patterns/04-components/facts-and-figures/facts-and-figures.js
+7
-7
7 additions, 7 deletions
...erns/04-components/facts-and-figures/facts-and-figures.js
with
7 additions
and
7 deletions
src/patterns/04-components/facts-and-figures/facts-and-figures.js
+
7
−
7
View file @
9f22be09
...
...
@@ -15,14 +15,11 @@
*/
function
runCarousel
(
id
,
numOfItems
)
{
var
$carousel
=
$
(
id
+
'
.carousel
'
,
context
);
if
(
$carousel
.
length
)
{
$carousel
.
flickity
({
cellAlign
:
'
left
'
,
contain
:
true
,
pageDots
:
true
,
prevNextButtons
:
false
,
wrapAround
:
tru
e
,
wrapAround
:
fals
e
,
groupCells
:
function
()
{
var
width
=
$
(
window
).
width
();
if
(
width
<=
600
)
{
...
...
@@ -68,11 +65,14 @@
});
});
// previous button
$
(
'
.uw-button--previous
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.uw-button--previous
'
).
on
(
'
click
'
,
function
()
{
var
$carousel
=
$
(
this
).
closest
(
'
.uw-ff
'
).
find
(
'
.carousel
'
);
$carousel
.
flickity
(
'
previous
'
);
});
// next
$
(
'
.uw-button--next
'
).
on
(
'
click
'
,
function
()
{
// next button
$
(
'
.uw-button--next
'
).
on
(
'
click
'
,
function
()
{
var
$carousel
=
$
(
this
).
closest
(
'
.uw-ff
'
).
find
(
'
.carousel
'
);
$carousel
.
flickity
(
'
next
'
);
});
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment