| Issue 478: | Youtube Via Process Handler Not Working | |
| 2 people starred this issue and may be notified of changes. | Back to list |
|
I am trying to put a "Youtube Via Process Handler" on my site, If i put the <a href="http://www.youtube.com/watch?v=lddUnv1R5y0" class="nyroModal">Youtube Via Process Handler</a> on the page when clicked the box will open fine but the video is not centred. But when I add the javascript code the link just acts as normal and I am taken to the youtube page.
May 22, 2010
Are you sure you included nyroModal JavaScript files? Could you provide a test page to see the problem?
May 22, 2010
Now I changed how I was sourceing the js file and that seemed to help but now the video is not centered - here is a link http://www.petsbath.com/booster-bath.html
May 24, 2010
Any Ideas?
May 25, 2010
For some reason, you're jQuery setup might be in strict mode, which means you can't
use the regular $ object as jQuery.
To solve you're problem, use this code:
jQuery(function() {
jQuery.nyroModalSettings({
processHandler: function(settings) {
var from = settings.from;
if (from && from.href && from.href.indexOf('http://www.youtube.com/watch?v=')
== 0) {
jQuery.nyroModalSettings({
type: 'swf',
height: 355,
width: 425,
url: from.href.replace(new RegExp("watch\\?v=", "i"), 'v/')
});
}
}
});
});
And it will works.
Status:
Fixed
May 25, 2010
Thank You Very Much :D |
||||||||
Even just this snippt would make the page redierect $(function() { $.nyroModalSettings({ }); }); whereas this wouldnt $(function() { });