Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Simon+

Members
  • Joined

  • Last visited

  1. Simon+ replied to jakez09's topic in Frontend
    you could use this: if (navigator.userAgent.toLowerCase().indexOf('iphone')!=-1) { document.location.href="/iphone.htm"; }
  2. this should be: #footer ul { list-style-type: none; }
  3.    Simon+ reacted to a post in a topic: i can not style my footer
  4. Hi, I'm Simon and I love JavaScript API's, JSON and REST API's!
  5. Hi, I'm having a problem with the Youtube Player API: I want it to load a video (by ID) but I can't make it work. It shows the video(s) in a "handmade" lightbox. When you click showVideo, it must load another video then the one that is already loaded. Here's the link... and here's the source: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>lightbox</title> <script src="http://www.google.com/jsapi"></script> <script type="text/javascript" src="Object.extended.js"></script> <style> #overlay { position: fixed; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 1000; display: none; } #videoBox { position: fixed; width: 640px; height: 385px; background: #fff; z-index: 1001; display: none; padding: 10px; } #videoBox a { display: block; position: absolute; top: -30px; right: 0px; border: 10px solid transparent; font-family: Arial; font-size: 16px; color: #eee; text-decoration: none; text-transform: uppercase; } #videoBox a:hover { border: 10px solid #fff; background: #fff; color: #000; } </style> <script> var videoBox, video; document.on('DOMContentLoaded', function() { video = { vid: document.getElementById('video'), load: function(id) { this.vid.loadVideoById(id); } }; videoBox = { box: document.getElementById('videoBox'), overlay: document.getElementById('overlay'), show: function(id) { this.box.style.left = ((window.innerWidth / 2) - 320) + 'px'; this.box.style.top = ((window.innerHeight / 2) - 205) + 'px'; this.box.style.display = 'block'; this.overlay.style.display = 'block'; video.load(id); }, hide: function() { this.box.style.display = 'none'; this.overlay.style.display = 'none'; } } }); function onYouTubePlayerReady(playerId) { if (playerId && playerId != 'undefined') { video.vid = document.getElementById('video'); } } </script> </head> <body> <a href="#" onclick="videoBox.show('KgLnyDJ2R8E')">showVideo</a> <div id="overlay"></div> <div id="videoBox"> <a href="javascript:void(0)" onclick="videoBox.hide()">Close</a> <object id="video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="385"> <param name="movie" value="http://www.youtube.com/v/ylLzyHk54Z0&enablejsapi=1&playerapiid=video" /> <param name="allowFullScreen" value="true"> <param name="allowScriptAccess" value="always"> <embed id="video" type="application/x-shockwave-flash" src="http://www.youtube.com/v/ylLzyHk54Z0&enablejsapi=1&playerapiid=video" width="640" height="385" allowfullscreen="true" allowscriptaccess="always"></embed> </object> </div> </body> </html> Please help me!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.