-2

I have a website with a picture with different pop up windows. The pop up windows are made with bootstrap modal pop up. The website has 34 pop up windows when someone clicks on a leaf in the picture.

What I want is when someone visited the website, randomly one of the 34 pop up window has to be showed.

How can I realize this? I use the twitter bootstrap modal pop up window.

breakslow_
  • 51
  • 1
  • 9

1 Answers1

1

Yes you can use Bootstrap's modal dialog for that. For your solution to work you may provide a custom startup method, like $('on', 'load', function () { var popsArray = ...; var popup = Math.random() * popsArray.length; ... }) That's it. As simple as this.

Daniel Schulz
  • 554
  • 2
  • 9