Widget:HoverCard: Difference between revisions

From Unforgotten Realms Wiki
Jump to navigationJump to search
imported>Pillowkeeper
mNo edit summary
imported>Pillowkeeper
mNo edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<style>
.box {
    display:none;
    position: absolute;
    z-index: +100;
    left: 50px;
}


a:hover + .box {
<script>
    display:block;
    window.addEventListener("load", function () {
}
      var quotes = [
</style>
        {
<a href="http://live.urealms.com/cards#accessory-00025-bagofbones">Bag of Bones</a>
          text: "text1",
<div class="box">
        },
<iframe src="http://live.urealms.com/cards#accessory-00025-bagofbones" id="card" width = "450px" height = "500px">
        {
</iframe>
          text: "text2",
</div>
        },
        {
          text: "text3",
        },
        {
          text: "text4",
        },
        {
          text: "text5",
        }
      ];
      var quote = quotes[Math.floor(Math.random() * quotes.length)];
      document.getElementById("text").innerHTML =
        '<p>' + quote.text + '</p>';
    })();
  </script>
<div id="text"></div>

Latest revision as of 01:59, 14 December 2016

<script>
   window.addEventListener("load", function () { 
     var quotes = [
       {
         text: "text1",
       },
       {
         text: "text2",
       },
       {
         text: "text3",
       },
       {
         text: "text4",
       },
       {
         text: "text5",
       }
     ];
     var quote = quotes[Math.floor(Math.random() * quotes.length)];
     document.getElementById("text").innerHTML =

'

' + quote.text + '

';

   })();
 </script>