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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>accueil</title>
<script src="js/jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="xx.css" type="text/css" media="screen" />
<script type="text/javascript">
//effect typewiter
$.fn.typewriter = function(opt) {
var typeone = function(self, text, content) {
if (text.length > 0) {
var next = text.match(/(\s*(<[^>]*>)?)*(&.*?;|.?)/)[0];
text = text.substr(next.length);
$(self).html(content+next);
setTimeout(function(){
typeone(self, text, content+next);
}, opt['delay']);
}
}
this.each(function() {
opt = opt || { 'delay': 50 };
$(this).height($(this).height());
$(this).width($(this).width());
typeone(this, $(this).html(), '');
});
}
$(document).ready(function(){
$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
$("ul.topnav li span").click(function() { //When trigger is clicked...
//Following events are applied to the subnav itself (moving subnav up and down)
$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click
$(this).parent().hover(function() {
}, function(){
$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
});
//Following events are applied to the trigger (Hover events for the trigger)
}).hover(function() {
$(this).addClass("subhover"); //On hover over, add class "subhover"
}, function(){ //On Hover Out
$(this).removeClass("subhover"); //On hover out, remove class "subhover"
});
});
$(document).ready(function(){ // le document est chargé
$("a").click(function(){ // on selectionne tous les liens et on définit une action quand on clique dessus
page=($(this).attr("href")); // on recuperer l' adresse du lien
$.ajax({ // ajax
url: page, // url de la page à charger
cache: false, // pas de mise en cache
success:function(html){ // si la requêté est un succÃs
afficher(html); // on execute la fonction afficher(donnees)
},
error:function(XMLHttpRequest, textStatus, errorThrows){ // erreur durant la requete
}
});
return false; // on desactive le lien
});
$("#centre").load("blabla.html");
$(".typewriter").typewriter();
});
function afficher(donnees){ // pour remplacer le contenu du div contenu
$("#centre").empty(); // on vide le div
$("#centre").append(donnees); // on met dans le div le résultat de la requete ajax
}
</script>
</head>
<body>
<div id="bloc_website">
<ul class="topnav">
<li>
<a href="blabla.html" >Accueil</a>
</li>
<li>
<a href=".blabla1html">Curriculum vitæ</a>
</li>
<li>
<a href="blabla2.html">Contact</a>
</li>
</ul>
<div id="centre" class="typewriter">
</div>
</div>
</body>
</html>
et blabla.html
<div id="llll">
<p>blablablablatrucnjkkljkljkjlk</p> |
Partager