Buen día a todos.
Tengo una pagina hecha con PHP, el problema es que quiero integrar un
plugin de Jquery llamado Qtip y no ejecuta nada de comandos de Qtip.
Si quito el codigo PHP la pagina corre de maravilla, pero cuando
integro las etiquetas <?php ?> no corre nada de Qtip. mi pagina
esta guardada con extensión PHP, aqui les dejo el codigo.
<!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>
<title>qTip - The jQuery tooltip plugin - Demos - Dynamic YouTube
preview</title>
<!--Stylesheets-->
<link type="text/css" rel="stylesheet" href="../../jquery-qtip-1.0.0-
rc3142732/master.css" />
<link type="text/css" rel="stylesheet" href="../../jquery-qtip-1.0.0-
rc3142732/qtip.css" />
<link type="text/css" rel="stylesheet" href="../../jquery-qtip-1.0.0-
rc3142732/demo.css" />
<link type="text/css" rel="stylesheet" href="../../jquery-qtip-1.0.0-
rc3142732/highlight.css" />
<!--Meta-->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!--Header JavaScript-->
<script type="text/javascript" src="../../jquery/jquery.js"></script>
</head>
<body>
<div id="master">
<div id="navarrow" class="center"><div class="demos"></div></div>
<div id="content" style="position:absolute; left: 6px; top: 311px;" >
<div class="center" style="height:300px">
<h3>Click on any of the links below to get a quick preview of the
youtube video it links to!</h3>
<p class="cloud">
<p class="cloud">
<p class="cloud"><a class="cloud2" href="
http://www.youtube.com/
watch?v=AKdIkFzUyIk" alt="">Male Black woodpecker</a>
<a class="cloud5" href="
http://www.youtube.com/watch?
v=Q1FYe263AlE" alt="">Tawny Owls - BBC</a>
<a class="cloud3" href="
http://www.youtube.com/watch?
v=zWHDoP5uwh8" alt="">Q-Tip - "ManWomanBoogie"</a> </div>
</div>
<script type="text/javascript" src="
http://ajax.googleapis.com/ajax/
libs/swfobject/2.1/swfobject.js"></script>
<script class="example" type="text/javascript">
$(document).ready(function()
{
// Use each method to gain access to all youtube links
$('a[href*="youtube."]').each(function()
{
// Grab video ID from the url
var videoID = $(this).attr('href').match(/watch\?v=(.+)+/);
videoID = videoID[1];
// Create content using url as base
$(this).qtip(
{
// Create content DIV with unique ID for swfObject
replacement
content: '<div id="youtube-embed-'+videoID+'">You need Flash
player 8+ to view this video.</div>',
position: {
corner: {
tooltip: 'bottomMiddle', // ...and position it center
of the screen
target: 'topMiddle' // ...and position it center of the
screen
}
},
show: {
when: 'click', // Show it on click...
solo: true // ...and hide all others when its shown
},
hide: 'unfocus', // Hide it when inactive...
style: {
width: 432,
height: 264,
padding: 0,
tip: true,
name: 'dark'
},
api: {
onRender: function()
{
// Setup video paramters
var params = { allowScriptAccess: 'always',
allowfullScreen: 'false' };
var attrs = { id: 'youtube-video-'+videoID };
// Embed the youtube video using SWFObject script
swfobject.embedSWF('
http://www.youtube.com/v/'+videoID
+'&enablejsapi=1&playerapiid=youtube-api-'+videoID,
'youtube-embed-'+videoID, '425',
'264', '8', null, null, params, attrs);
},
onHide: function(){
// Pause the vide when hidden
var playerAPI = this.elements.content.find('#youtube-
video-'+videoID).get(0);
if(playerAPI && playerAPI.pauseVideo)
playerAPI.pauseVideo();
}
}
}
).attr('href', '#');
});
});
</script>
<script type="text/javascript" src="../../jquery-qtip-1.0.0-
rc3142732/jquery.qtip-1.0.0-rc3.js"></script>
<script type="text/javascript" src="../../jquery-qtip-1.0.0-rc3142732/
highlight.js"></script>
<script type="text/javascript" src="../../jquery-qtip-1.0.0-rc3142732/
javascript.js"></script>
<script type="text/javascript" src="../../jquery-qtip-1.0.0-rc3142732/
demo.js"></script>
</body>
</html>