From 2f044a737864f727ec2444f7ee9a3671fc44a45e Mon Sep 17 00:00:00 2001 From: mindaugasvcs <34163000+mindaugasvcs@users.noreply.github.com> Date: Wed, 19 Apr 2023 23:32:48 +0300 Subject: [PATCH] Allow html elements between "track" and "wrapper" Make Glide more customizable by allowing html elements between the "track" and the "wrapper". --- src/components/html.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/html.js b/src/components/html.js index d2ef86d5..5c900d3f 100644 --- a/src/components/html.js +++ b/src/components/html.js @@ -4,6 +4,7 @@ import { define } from '../utils/object' import { isString } from '../utils/unit' const TRACK_SELECTOR = '[data-glide-el="track"]' +const WRAPPER_SELECTOR = '[data-glide-el="wrapper"]' export default function (Glide, Components, Events) { const Html = { @@ -87,7 +88,7 @@ export default function (Glide, Components, Events) { * @return {Object} */ get () { - return Html.track.children[0] + return Html.track.querySelector(WRAPPER_SELECTOR) } })