jquery plugin probleem - HELP!
ik ben bezig met het integreren van een jquery plugin in me html5, maar het wil maar niet lukken. In de index.html die bij de plugin kwam doet 'ie het perfect, maar zodra ik de script copy past in me index.php file wil die niet werken.
Hier is de code misschien kunnen jullie mij helpen, zit hier al uren mee.
Het probleem lijkt ze voor te doen tussen <script> </script bij '#main'
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?PHP
// MENU CLASS
$menuClass = 'adverteren';
// HEADER
include 'includes/header.inc.php';
echo'
<head>
<script src="jquery-1.5.js" type="text/javascript"></script>
<script src="JQYouTubeSlidingGallery-obf.js" type="text/javascript"></script>
<title></title>
<script type="text/javascript">
$(document).ready(function () {
$('#main').JQSlidingYouTubeGallery({autoPlayFirstVideo:false});
});
</script>
</head>
<body style="background-color: #000000; padding-left: 300px; position: relative;
color: Wheat; padding-top: 100px;">
<div id="main">
<ul style="display: none;">
<li>
<img src="bVqjx34RQpM"/>
<img alt="2" src="assets/thumbs/1.jpg"/>
<p>Video title 1</p>
<p><cite>Video description can be any formated html (italic)</cite></p>
</li>
<li>
<img src="zyaTO9EakCE"/>
<img alt="Second Video" src="assets/thumbs/2.jpg"/>
<p>Video title</p>
<p><b>Video description can be any formated html (bold)</b></p>
</li>
<li>
<img src="AJZ64EXdpgQ"/>
<img alt="2" src="assets/thumbs/3.jpg"/>
<p>Video title</p>
<p><u>Video description can be any formated html</u> (underline)</p>
</li>
<li>
<img src="06lLOl3GioA"/>
<img alt="Second Video" src="assets/thumbs/4.jpg"/>
<p>Video title</p>
<p><span style="color: red;">Description can be coloured</span></p>
</li>
<li>
<img src="vGTvXFXOWrE"/>
<img alt="2" src="assets/thumbs/5.jpg"/>
<p>Video title</p>
<p>Description can contains a link <a href="http://flcomponents.net">FLComponents</a></p>
</li>
<li>
<img src="S4CfWdoSOTk"/>
<img alt="Second Video" src="assets/thumbs/6.jpg"/>
<p>Video title</p>
<p>Description can be any HTML</p>
</li>
<li>
<img src="RXqSedWSu2k"/>
<img alt="2" src="assets/thumbs/7.jpg"/>
<p>Video title</p>
<p>Description can be any HTML</p>
</li>
<li>
<img src="6_z6dmE-YMQ"/>
<img alt="Second Video" src="assets/thumbs/9.jpg"/>
<p>Video title</p>
<p>Description can be any HTML</p>
</li>
<li>
<img src="rUAwj3mcDCU"/>
<img alt="2" src="assets/thumbs/10.jpg"/>
<p>Video title</p>
<p>Description can be any HTML</p>
</li>
</ul>
</div>
</article>
<!--article-->
';
// FOOTER
include 'includes/footer.inc.php';
?>
// MENU CLASS
$menuClass = 'adverteren';
// HEADER
include 'includes/header.inc.php';
echo'
<head>
<script src="jquery-1.5.js" type="text/javascript"></script>
<script src="JQYouTubeSlidingGallery-obf.js" type="text/javascript"></script>
<title></title>
<script type="text/javascript">
$(document).ready(function () {
$('#main').JQSlidingYouTubeGallery({autoPlayFirstVideo:false});
});
</script>
</head>
<body style="background-color: #000000; padding-left: 300px; position: relative;
color: Wheat; padding-top: 100px;">
<div id="main">
<ul style="display: none;">
<li>
<img src="bVqjx34RQpM"/>
<img alt="2" src="assets/thumbs/1.jpg"/>
<p>Video title 1</p>
<p><cite>Video description can be any formated html (italic)</cite></p>
</li>
<li>
<img src="zyaTO9EakCE"/>
<img alt="Second Video" src="assets/thumbs/2.jpg"/>
<p>Video title</p>
<p><b>Video description can be any formated html (bold)</b></p>
</li>
<li>
<img src="AJZ64EXdpgQ"/>
<img alt="2" src="assets/thumbs/3.jpg"/>
<p>Video title</p>
<p><u>Video description can be any formated html</u> (underline)</p>
</li>
<li>
<img src="06lLOl3GioA"/>
<img alt="Second Video" src="assets/thumbs/4.jpg"/>
<p>Video title</p>
<p><span style="color: red;">Description can be coloured</span></p>
</li>
<li>
<img src="vGTvXFXOWrE"/>
<img alt="2" src="assets/thumbs/5.jpg"/>
<p>Video title</p>
<p>Description can contains a link <a href="http://flcomponents.net">FLComponents</a></p>
</li>
<li>
<img src="S4CfWdoSOTk"/>
<img alt="Second Video" src="assets/thumbs/6.jpg"/>
<p>Video title</p>
<p>Description can be any HTML</p>
</li>
<li>
<img src="RXqSedWSu2k"/>
<img alt="2" src="assets/thumbs/7.jpg"/>
<p>Video title</p>
<p>Description can be any HTML</p>
</li>
<li>
<img src="6_z6dmE-YMQ"/>
<img alt="Second Video" src="assets/thumbs/9.jpg"/>
<p>Video title</p>
<p>Description can be any HTML</p>
</li>
<li>
<img src="rUAwj3mcDCU"/>
<img alt="2" src="assets/thumbs/10.jpg"/>
<p>Video title</p>
<p>Description can be any HTML</p>
</li>
</ul>
</div>
</article>
<!--article-->
';
// FOOTER
include 'includes/footer.inc.php';
?>
Toevoeging op 24/10/2011 23:52:44:
Misschien moet ik erbij zeggen dat ik zeer onervaren ben.
Oplossing gebruik een double-quoted echo en escape de binnengelegen double quotes door er een \ voor te plaatsen, of plaats de HTML en JS buiten het PHP-blok en de echo.
Hartelijk dank!
Gewijzigd op 25/10/2011 00:44:52 door eckies eki