Autor Zpráva
Jank
Profil *
Ahoj, nikdy jsem nepracoval s pop-okny. Našel jsem pěkný zdroják, funguje, ale nevím, kam vložit text nebo obrázek, aby se v okně zobrazil ... díky za radu

<h1>Hello, there!</h1>
<h2>This is some content</h2>
<p>The popup will open in <span id="seconds">5</span> seconds</p>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://www.jacklmoore.com/colorbox/jquery.colorbox.js"></script>
<script>function openColorBox(){
        $.colorbox({iframe:true, width:"80%", height:"80%", href: "https://www.sitepoint.com/"});
      }
      
      function countDown(){
        seconds--
        $("#seconds").text(seconds);
        if (seconds === 0){
          openColorBox();
          clearInterval(i);
        }
      }

      var seconds = 5,
          i = setInterval(countDown, 1000);</script>
Kcko
Profil
Jank:
Takhle nějak:


<h1>Hello, there!</h1>
<h2>This is some content</h2>
<p>The popup will open in <span id="seconds">5</span> seconds</p>


<div style="display: none;">
  <div id="text">
    <h2>Test obrázku</h2>
    <img src="https://www.google.com/logos/doodles/2015/googles-new-logo-5078286822539264.3-hp2x.gif" alt="" />
  </div>
</div>





<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://www.jacklmoore.com/colorbox/jquery.colorbox.js"></script>
<script>function openColorBox(){
        $.colorbox({inline: true, href: "#text", width:"80%", height:"80%"});
      }
      
      function countDown(){
        seconds--;
        $("#seconds").text(seconds);
        if (seconds === 0){
          openColorBox();
          clearInterval(i);
        }
      }
 
      var seconds = 5,
          i = setInterval(countDown, 1000);</script>
Jank
Profil *
Kcko:
Moc díky, funguje :-) hurááá Zase jsem o kousek chytřejší ..

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0