Widget:HoverCard: Difference between revisions

From Unforgotten Realms Wiki
Jump to navigationJump to search
imported>Pillowkeeper
mNo edit summary
imported>Pillowkeeper
m testing
Line 1: Line 1:
<style>
<body>
 
  <div id="text"></div>
iframe{
  <script>
height: 2000px;
    (function() {
width: 500px;
      var quotes = [
position: absolute;
        {
top: -500px;
          text: "text1",
}
        },
 
        {
.box{
          text: "text2",
    display: none;
        },
}
        {
 
          text: "text3",
a:hover + .box,.box:hover{
        },
    display: block;
        {
    position: relative;
          text: "text4",
    z-index: 100;
        },
}
        {
</style>
          text: "text5",
<a href="http://live.urealms.com/cards#accessory-00025-bagofbones">Bag of Bones</a>
        }
<div class="box">
      ];
<iframe src="http://live.urealms.com/cards#accessory-00025-bagofbones" scrolling="no" id="card" width = "450px" height = "500px">
      var quote = quotes[Math.floor(Math.random() * quotes.length)];
</iframe>
      document.getElementById("text").innerHTML =
</div>
        '<p>' + quote.text + '</p>';
    })();
  </script>
</body>

Revision as of 01:40, 14 December 2016

<body>

 <script>
   (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>

</body>