0

I use the below code in my page

<link type="text/css" rel="stylesheet" href="galleria/themes/classic/galleria.classic.css">
<script src="galleria/galleria-1.2.9.min.js"></script>
<script src="galleria/plugins/history/galleria.history.min.js"></script>
<script type="galleria/themes/classic/galleria.classic.min.js"></script>

<div id="galleria">
  <img src="./test/1_1.jpg">
  <img src="./test/1_2.jpg">
  <img src="./test/1_3.jpg">
</div>
<script>
  Galleria.run('#galleria');
</script>

I get this error

Init failed: Galleria could not find the element "#galleria"

I don't understand where the problem is. Please suggest me.

Tomalak
  • 332,285
  • 67
  • 532
  • 628
vijaykumar
  • 4,658
  • 6
  • 37
  • 54

1 Answers1

1

have you tried adding a theme - I suppose it requires one. The ones declared at the top might not be doing the trick.

Put this right above your Galleria.run code..

<script>
  Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
  Galleria.run('#galleria');
</script>
james emanon
  • 11,185
  • 11
  • 56
  • 97