Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Can we use more than one glide in a page #622

Unanswered
Khanhan2k2 asked this question in Q&A
Discussion options

When i create 2 glide in my page, just one can work, Please tell me, can I use more than one glide in my page. Thanks

You must be logged in to vote

Replies: 1 comment

Comment options

Yes, you can, relatively easily, my process is that I give an ID to the containing div, so i can target it with the JS, then I do something like this in my js file;

if (document.getElementById('IDofTheDiv') !== null){
 var glideIDofTheDiv = new Glide('.IDofTheDiv', {
 type: 'carousel',

this is also so that one can be safe in not having ALL the glides displayed at all times without their javascript breaking down.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /