in,uit-klap scherm
dus als je op de tekst/link drukt dat je dan een schermpje komt/weggaat.
alvast bedankt,
gm1999
ik weet niet of het veel verschilt maar toch...
http://demos.mootools.net/Fx.Slide
Gewijzigd op 01/01/1970 01:00:00 door ruben van assche
http://www.jankoehoorn.nl/phphulp/scripts/readmore.php
Zo ja, hieronder de broncode (wel minstens mootools core vereist)
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
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
<?php
ini_set ('display_errors', 1);
error_reporting (E_ALL | E_STRICT);
$config = array (
'title' => 'Jan Koehoorn | PHPHulp voorbeelden | Read more script'
);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$config['title'];?></title>
<script type="text/javascript" src="../../mootools/mootools_core.js"></script>
<!--
Hier gebeurt het eigenlijke werk, met JavaScript dus.
-->
<script type="text/javascript">
window.addEvent ('domready', function () {
$$('div.textblock h2').each (function (item) {
item.addEvent ('click', function () {
var display = (this.getNext ().getStyle ('display') == 'none') ? ('block') : ('none');
this.getNext ().setStyles ({'display' : display});
});
});
});
</script>
<link rel="stylesheet" type="text/css" media="screen" href="http://www.jankoehoorn.nl/phphulp/reset.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://www.jankoehoorn.nl/phphulp/stylesheet.css" />
<style type="text/css" media="screen">
div.textblock h2 {cursor: pointer;}
div.textblock p {display: none;}
</style>
</head>
<body>
<div id="container">
<div id="header">
<h1><?=$config['title'];?></h1>
</div>
<div id="content">
<h1>Read more script</h1>
<p>Click een titel om de alinea die erbij hoort zichtbaar te maken.</p>
<div class="textblock">
<h2>alinea 01</h2>
<p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.</p>
</div>
<div class="textblock">
<h2>alinea 02</h2>
<p> It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar.</p>
</div>
<div class="textblock">
<h2>alinea 03</h2>
<p> The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didnt listen. She packed her seven versalia, put her initial into the belt and made herself on the way. When she reached the first hills of the Italic Mountains, she had a last view back on the skyline of her hometown Bookmarksgrove, the headline of Alphabet Village and the subline of her own road, the Line Lane. Pityful a rethoric question ran over her cheek, then </p>
</div>
</div>
<div id="footer">
<?php
$source = basename (__FILE__) . 's';
if (file_exists ($source)) {
echo '<p><a href="' . $source . '">Bekijk de PHP source code</a> van dit voorbeeld.</p>';
}
?>
</div>
</div>
</body>
</html>
ini_set ('display_errors', 1);
error_reporting (E_ALL | E_STRICT);
$config = array (
'title' => 'Jan Koehoorn | PHPHulp voorbeelden | Read more script'
);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$config['title'];?></title>
<script type="text/javascript" src="../../mootools/mootools_core.js"></script>
<!--
Hier gebeurt het eigenlijke werk, met JavaScript dus.
-->
<script type="text/javascript">
window.addEvent ('domready', function () {
$$('div.textblock h2').each (function (item) {
item.addEvent ('click', function () {
var display = (this.getNext ().getStyle ('display') == 'none') ? ('block') : ('none');
this.getNext ().setStyles ({'display' : display});
});
});
});
</script>
<link rel="stylesheet" type="text/css" media="screen" href="http://www.jankoehoorn.nl/phphulp/reset.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://www.jankoehoorn.nl/phphulp/stylesheet.css" />
<style type="text/css" media="screen">
div.textblock h2 {cursor: pointer;}
div.textblock p {display: none;}
</style>
</head>
<body>
<div id="container">
<div id="header">
<h1><?=$config['title'];?></h1>
</div>
<div id="content">
<h1>Read more script</h1>
<p>Click een titel om de alinea die erbij hoort zichtbaar te maken.</p>
<div class="textblock">
<h2>alinea 01</h2>
<p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia.</p>
</div>
<div class="textblock">
<h2>alinea 02</h2>
<p> It is a paradisematic country, in which roasted parts of sentences fly into your mouth. Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line of blind text by the name of Lorem Ipsum decided to leave for the far World of Grammar.</p>
</div>
<div class="textblock">
<h2>alinea 03</h2>
<p> The Big Oxmox advised her not to do so, because there were thousands of bad Commas, wild Question Marks and devious Semikoli, but the Little Blind Text didnt listen. She packed her seven versalia, put her initial into the belt and made herself on the way. When she reached the first hills of the Italic Mountains, she had a last view back on the skyline of her hometown Bookmarksgrove, the headline of Alphabet Village and the subline of her own road, the Line Lane. Pityful a rethoric question ran over her cheek, then </p>
</div>
</div>
<div id="footer">
<?php
$source = basename (__FILE__) . 's';
if (file_exists ($source)) {
echo '<p><a href="' . $source . '">Bekijk de PHP source code</a> van dit voorbeeld.</p>';
}
?>
</div>
</div>
</body>
</html>
Gewijzigd op 01/01/1970 01:00:00 door Jan Koehoorn
maar ik bedoel wel dit.