Hi and thanks for looking into this.
I have a code I've been working on to add videos to my site. All videos are from youtube. Once a user has clicked on submit, a link becomes visible. When clicking on it the user can preview the video.
One week ago I used the following to achieve this:
$("#result").html('<a href="javascript:initPlayer(\'http://www.youtube.com/watch?v=kXhy7ZsiR50\')>Preview video</a><br>');
Everything worked fine. But today I was trying the script and the link doesn't appear anymore. The link works however fine if I do something like:
Preview video
Somewhere on the page.
I don't know why the call with jQuery doesn't work anymore. It worked fine when I was developing the website. I tried it on different browsers, but with the same result in the end.
Anyone any idea how to solve this? I'm starting to pull out my hair. :)
Thanks in advance.
This seems to work fine:
$("#result").html("<a href='javascript:initPlayer(\"http://www.youtube.com/watch?v=kXhy7ZsiR50\")'>Preview video</a><br>");
I think it's a double/single quotes problem. Everything is back to normal.
Related
I have an owl.carousel on my website displaying testimonials. I didn't have any issues with this until about a month or two ago. I have no idea what happened that now I have this problem but i'll try to explain as best as I can.
I'm getting two different views of the carousel on the firefox and chrome. On firefox, it looks perfectly fine and displays correctly. On chrome how ever, it seems like after the browser cashes the page, the carousel decides to align all the text to the right (I know this is confusing so ill put picture in so you guys can see). The reason I say after it cashes the page is because, when I load the page with no cashe on chrome, it looks perfectly fine as it does on firefox, but as soon as I go to another page and then come back or refresh the page, the carousel all shifts to the right.
Here is what it looks like on chrome:
https://gyazo.com/2466dc69c470851122693d622975c018 --> Chrome
Here is also a link to the website for who ever that wants to read the code them selves (scroll down the home page and you will see the testimonials section):
http://ecocertificates.com.au
Any help would be greatly appreciated guys!
Thanks in advance :)
So, I'm kinda new to jquery, and this is the first time I've had to deal with the issue I'm having at the moment.
I think it's an interference with Wordpress suddenly updating to 3.9 - 3.9.1 or something, though I can't specifically nail it down.
So the way this site works is that I had the boxes with the videos work like they do now, you clicked play and it would pop up in a fancybox and start playing the video.
It still does this - however, it will just show the loader, and not actually load the fancybox.
And before you ask, I could only get it working in the first place with jquery 1.11, due to various conflicts, but now it suddenly wont work at all.
http://ramborg.com/commercial <- You can see the issue here.
The videos shown are mostly Vimeo, I'm pretty sure they all are, but maybe there has been some YT also added, but that wouldn't matter, if the media helper actually worked.
Any ideas, and input would be greatly appreciated, before I just revert down to an older version of WP to make it work again.
EDIT: Appearntly the fancybox will EVENTUALLY load, it's just heavily delayed. It took like 1-2 minutes into a video before it loaded. If you goto Stills the fancybox will load almost right away (it's just an image). It's almost like it wont open the fancybox until the video is done buffering?
EDIT2: From what I can garner from console/inspect in Chrome, is that it's struggling with loading player.js from Vimeo? Is that the error the rest of you see aswell? Any way I could solve this issue?
I just checked. The videos all load promptly, and no errors in the console in chrome. Try loading the page both while logged in to wordpress and logged out to see if there is a difference.
I had a working version of Piecemaker flash slider on my site. After tinkering with the theme the slider stoped working. Trying to track down the problem i've setup an almost exact enviroment as the demo with no success.
I've checked that all the links are working, but i haven't been able to make the slide work again.
here's the link: http://www.aquaeliteevents.com/wordpress/?page_id=1430
Thanks in advance
Turns out the XML was referencing resources from a different subdomain, once i configured the wordpress to appear on the same subdomain the piecemaker worked again.
I have web page in which i want to slide the images from right to left it works fine on jsFiddle but when i edit that code in my web page it does not slide i don't know what is the problem.
Below is the online code which works fine but when i add this in my code it does not work.
http://jsfiddle.net/WM5tA/7/
My number one suggestion would be checking that your jquery file is included in your code, because jsFiddle does it for you.
Please see an example here:
http://jsfiddle.net/GmhHd/1/
Click the link to have the embedded player slide down. In my Chrome browser, the video is displayed as either a green or black box. It appears to work fine in Firefox.
Is there a way to get around this / should I be doing this another way?
Thanks in advance
Try this way: http://jsfiddle.net/PcfQY/.
It works for me.