costa free asked 6 years ago


Hi, Is it possible to have carousel loops of photos that I have in a folder ?

Jakub Mandra staff answered 6 years ago


Well, that's the completely other thing. It is not stricte connected with MDB framework. You can use some template engines like f.e. Pug. JQuery doesn't have that strength. Or you can grab the container with JS and inject HTML. Like so: http://api.jquery.com/jQuery/#jQuery2   

costa free answered 6 years ago


Hi Jakub, The photos are in cloudinary. I don't want to repeat the code as I am doing now. For example, I am repeating the code below more than 20 times: <div class="carousel-item"> <img class="d-block w-100" src="https://res.cloudinary.com/cmcosta/image/upload/v1539716790/20181012-WA0021.jpg " alt=""> </div> I would like to put a for loop to reuse the code. could you help me?  

Jakub Mandra staff answered 6 years ago


Hi,   Ofcourse it is possible. But there are at least few approaches to do that. Simplest answer: just add URLs to your photos. <img class="d-block w-100" src="./assets/your-photo.jpg">   Best, Jakub

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: COMPUTER
  • Browser: GOOGLE
  • OS: IOS
  • Provided sample code: No
  • Provided link: No