Autor | Zpráva | ||
---|---|---|---|
Jank Profil * |
#1 · Zasláno: 6. 9. 2017, 13:06:26
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 |
#2 · Zasláno: 6. 9. 2017, 14:59:50
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 * |
#3 · Zasláno: 8. 9. 2017, 08:49:39
Kcko:
Moc díky, funguje :-) hurááá Zase jsem o kousek chytřejší .. |
||
Časová prodleva: 7 let
|
0