How to create new YouTube video load feature - javascript

I have noticed YouTube have made a new feature on their desktop website where when a new video is loading it shows a red load bar at the top of the page showing the load status of the video.
I am looking to do something like this but for loading a new page on a website I know I may have to use JavaScript / jQuery.
If you could check out the feature and I would appreciate if someone could help me in doing something like that using CSS and JavaScript.
Doesn't seem very hard, A JSFiddle would be great.

Ryman.
I don't know if you've found, but I did.
Take a look:
http://www.onextrapixel.com/2013/09/02/loadingbar-js-adding-a-youtube-like-loading-bar-to-your-website/
Best regards.

Related

How to troubleshoot a white flash between page loads

I'm working on a website, and it flashes a white screen between page loads, every time I click a link. I've read a lot of other posts on similar issues, but each scenario looks to be different. How do I best go about troubleshooting where this flash is coming from?
The site is using WordPress, custom built from the Genesis Child Sample theme. I'm not greatly versed in the Inspector tool. Anything I should be focusing on in reviewing/testing?
This issue ended up coming from an animation I was unaware of on the .site-container. I removed this CSS, and the issue was resolved.

HTML Button Highlight With Jquery Not Working

I am currently in the process of building a web app. I am trying to get an image when clicked to change image source and then hide one div and show another. This seems to work fine when viewing within a browser but when viewed on an iPad the button image change doesn't work. An example of what I am currently doing is below:
$("#pg3rgt_en_GB").click(function(){
$(this).css("background-image","url(images/right-button-down.jpg)");
setTimeout(function(){
$("#introduction_en_GB").hide();
$("#pg3rgt_en_GB").css("background-image","url(images/right-button.jpg)");
$("#customerinput_en_GB").show();},250);
I hope that this is something simple I am missing. I appreciate any help and thanks in advance!
Safari doesn't recognise the show and hide features that jQuery has to offer. The best way around this would be to assign different css classes - which safari does recognise!

Is it possible to play a quick chime in website without a plugin (no Flash or Quicktime)?

I have a single page web app that shows real time data using just HTML/CSS/JS - I have managed to keep Flash out of it.
Now I want to play a small chime but I don't want to make the site dependent on Flash. It is just a chime to indicate a new chat, so it is not a huge stumbling block but I would like to find a way.
Is this possible - I am guessing no since you need something local to play the sound, but I am hoping here!
Thanks in advance for any help!
Edit: I am not able to use HTML5 quite yet.
Check out the HTML5 audio framework buzz or MediaElement.JS
Playing .wav files embedded in html? Try Different ways to play sound from a website - UCL
Example two of this web page shows a good example. An easier version of this example would be this...
function playSound(soundfile) {
document.getElementById("sound_element").innerHTML=
"<embed src='"+soundfile+"' hidden=true autostart=true loop=false/>";
}
The HTML would be this...
<span id="sound_element"></span>
This puts a hidden embedded file in the web page. You can call this function by doing playSound(Path/To/File)

Trouble between an injected iframe and other web page (Google, Gmail, Pdf)

Well i'm currently developping my Toolbar for Google Chrome as a Extension. The main principe is that i'm all the time injecting the toolbar as an iframe by using the Content Script.
But now i see a couple of bug with gmail, google map/search, pdf an maybe other that i've not yet see...
Let me explain, when i go on gmail, i don't see my toolbar at all...
When i open Google, it seems really normal :
But then when i start a search my toolbar seems to overide the top link (web, images, videos, maps,...) I can't click on them anymore...
Next problem is when i'm trying to go on google map or trying to open a PDF, it seems to give the same css to these web pages from my toolbar...
Google Maps :
PDF :
Hope i where clear enough, do not hesitate to ask me question if necessary ;)
Why don't you use absolute/fixed positioning and style attributes? Using style attributes would remove the issue of the possible spread of CSS.
To remove the toolbar from pdf, you could write something that removes the element when on pdf?
Well, i've find a good solution to resolve the problem with PDF and Google Map it was a problem on my CSS.
About the google Search now it works perfectly by setting the body webpage as a fixed page like NeXXeus tell me but there is still a problem.
Check this out :
EDIT : We don't really see, the argument select/deselect is top: 0px;

How can I work with embedded youtube videos with javascript?

I want to have a youtube player that changes videos when the links on the right are clicked. I know this is pretty basic but I've been tearing my hair out for 3 days now. I found an example using pictures an have been trying to modify it but no luck. Please help!
video gallery
I would stick to jQuery and try this:
http://smple.com/videoGallery/
Of course there are plenty alternatives available. Please see:
http://www.jquery.wisdomplug.com/jquery-plugins/multimedia-jquery-plugins/best-jquery-video-plugins/

Categories