fancybox is not working with jquery version after 1.8.3 - fancybox

i've been using fancybox with jquery 1.7 or 1.8 but it's not working at all with jquery 1.9 nor 1.10 nothing happens at all as it doesn't exist with these versions here's my js code
$(a"#ytvid").fancybox({
openEffect : 'elastic',
closeEffect : 'elastic',
openSpeed : 500,
closeSpeed : 500
});
and html code
play youtube video
<div style="display:none;" id="video">
<iframe width="560" height="315" src="http://www.youtube.com/embed/qbgBxr4H59A" frameborder="0" allowfullscreen></iframe>
</div>

Working after downloading new fancybox 2.1

Related

Content not loading usin Editor.md on deployment server but working locally

I am using Editor.md (https://pandao.github.io/editor.md/en.html) on a project.
The backend is flask. I fetch all of the information from the DB and load into the render page:
<div id="test-editormd">
<textarea id="jobDescription">
{{job_data['job_description']}}
</textarea>
</div>
The html page template imports the Editor.md lib in the end of the page and the CSS on top of the page:
<script src="https://cdnjs.cloudflare.com/ajax/libs/editor-md/1.5.0/editormd.min.js" integrity="sha512-bbYbjE426azR7zve+4dGnNpiD7Hp+zKzvWttsxa4Uc0t2GyA6FjTHLZ+3Q5BkoUAG/TZHMzVYwFEIT58HHEANw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script>
<script src="../static/assets/editormd/languages/en.js"></script>
<script type="text/javascript">
var testEditor;
$(function() {
testEditor = editormd({
id : "test-editormd",
width : "100%",
height : 1000,
path : "../static/assets/editormd/lib/"
});
});
</script>
Problem: It loads ok and works on my local machine when I run it.
But when I deploy to the server I get the forever will of death lol:
Any ideas of what can be causing the problem?
Thanks!

embedd youtube video without share option

I have an iPhone app where I am playing youtube videos.
I have tableview where I am listing all videos.
I am using below code to play youtube vide.
<html><style>iframe {position:absolute;top:0px;left:0px;}</style>
<body>
<iframe src='http://www.youtube.com/embed/rxSwgvMg-H4?rel=0&html5=1' width='100' height='75' frameborder='0' >
</iframe>
</body>
</html>
All is working fine.
However client is insisting to remove share and text of video that are coming on the top.
Any idea how can I get this done?
try this code
<iframe src='http://www.youtube.com/embed/rxSwgvMg-H4?modestbranding=1&showinfo=0&fs=0' width='300' height='175' frameborder='0' >
</iframe>
working link:
http://jsfiddle.net/Bh4ac/
Remove Red color from play button:
<center><iframe src="https://www.youtube.com/embed/HAR49CWiEjY?modestbranding=1&title=&autoplay=0&re l=0&controls=0" type=”application/x-shockwave-flash” frameborder="0" width="600" height="400"></iframe></center>

Getting Flowplayer to work in a Fancybox

I have a series of links, and I setup both Flowplayer (http://flowplayer.org) and Fancybox (http://fancybox.net/):
<a class="fancybox" href="../public/video1.flv">Click here</a>
<a class="fancybox" href="../public/video2.flv">Click here</a>
<a class="fancybox" href="../public/video3.flv">Click here</a>
...
I want to open these videos in a Fancybox (last version, 1.3 - I read around tutorials for 1.2 that don't fit my case), one at a time
I'm amazed on how simply it is done with JWPlayer:
<a class="fancybox" href="../jwplayer/player.swf?file=../public/video1.flv">Click here</a>
<a class="fancybox" href="../jwplayer/player.swf?file=../public/video2.flv">Click here</a>
<a class="fancybox" href="../jwplayer/player.swf?file=../public/video3.flv">Click here</a>
...
$('a.fancybox').fancybox({
'titleShow': false,
'type': 'swf',
'width': 480,
'height': 385,
});
With Flowplayer, this very simple thing feels like hell
I tried:
<a class="fancybox" href="../flowplayer/flowplayer-3.2.5.swf?&config={'clip':'../public/video1.flv'}">Click here</a>
<a class="fancybox" href="../flowplayer/flowplayer-3.2.5.swf?&config={'clip':'../public/video2.flv'}">Click here</a>
<a class="fancybox" href="../flowplayer/flowplayer-3.2.5.swf?&config={'clip':'../public/video3.flv'}">Click here</a>
And, apart from not having the controlbar, I get a flick of "error 301" (maybe because it looks for controlbar .swf but it doesn't load)
Finding the "embed parameters as querystring" feature in the online documentation is a nightmare (and infact I found this approach on other sites), so I can't check if I'm right or wrong, and what I can do to avoid error 301
EDIT: I solved the error 301, the original "flowplayer.controls-3.2.3.swf" file should be renamed into "flowplayer.controls.swf" (this is written nowhere, you have to guess it); anyway, it doesn't help that much since on IE7/8 it badly crashes - the JavaScript console flickers and says that "'null' is null or is not an object"
I also tried the jjames solution posted here: http://flowplayer.org/forum/2/17398
But it doesn't work for me: Firefox crashes and, on IE, Fancybox tells me that ther resource should not be located
And, anyway, seems this wotk for a single file, while I need a general function that receives the href of the links as parameter...
So, this doesn't make sense to me...
$(".fancybox").fancybox({
'callbackOnShow': function() { // callbackOnShow doesn't exists anymore on Fancybox 1.3; seems replaced by onComplete, but no luck
flowplayer("fancy_div", "../flowplayer/flowplayer-3.2.5.swf", {
clip: {
baseUrl: 'http://www.myPathToVids',
url: 'myVideo.flv' // I have not a single video! This should be a parameter taken from href of the clicked link
}
});
}
})
Please, any help?
Thanks in advance, I'm getting mad...
Try manually launching fancybox and setting setting its content to a flowplayer.
For instance, given the link:
<a href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv"
class="videoLink">Demo</a>
create a JQuery click function like this:
$('a.videoLink').click(function(e) {
e.preventDefault();
var container = $('<div/>');
container.flowplayer(
'http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf',
$(this).attr('href')
);
$.fancybox({
content: container,
width: 300, height: 200,
scrolling: 'no',
autoDimensions: false
});
});
Note that flowplayer by default takes up size of it's container, so must be given finite dimensions to view it properly.

Facebook Share and Like button display same count - that's not right

How come the Share and Like button have the same count?
I just implemented the Like button today and should only have around 2-3 likes.
You can see my problem here: http://www.norwegianfashion.no/news/ofw-forbids-fur-on-the-catwalk/
The code I use is this:
<div class="share">
<div class="face_share">
<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>
<div class="face_like">
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=130&action=like&colorscheme=light&font=arial" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:130px; height:20px;"></iframe>
</div>
<div class="twitter">
Tweet<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
</div>
Both functions are doing the same thing now:
Share is still an option, however we merged the external count so that
the count represents total
interactions with the URL.
Additionally, ‘like’ still gives you the ability to publish an image
when a comment is added (through the
XFBML version).
Source.

Add iframe to facebook fan page without onClick method

Is there a way to add an iframe to a facebook page without having to do the onClick functionality?
Right now I am using this code and it works fine except you have to click the link to make it show the iframe?
<!-- Start iframe CODE -->
Like me to show the iFrame link!
<fb:visible-to-connection>
<a onClick="outside_location.setInnerFBML(link_1);" style="cursor: pointer;">Click here to show the iFrame!</a>
</fb:visible-to-connection>
<div id="outside_location"></div>
<fb:js-string var="link_1">
<fb:iframe height="500" allowTransparency="true" frameborder="0" scrolling="no" style="width:100%; height: 1400px; border:none" src="http://apps.ignitesocialmedia.com/php/facebook/sandbox/tabs/iframe.php"></fb:iframe>
</fb:js-string>
<script type="text/javascript" charset="utf-8">
var outside_location = document.getElementById('outside_location');
</script>
<!-- End iframe CODE -->
It seems as though this has been done in a couple places but I cannot figure it out.
http://forum.developers.facebook.net/viewtopic.php?pid=262170#p262170