Bonjour,

J'édite, car j'ai trouver un autre script plus approprié, cependant il me manque a savoir comment prendre la valeur data-href afin que celui ci s'ouvre dans une nouvelle fenetre ?
Merci pour votre aide

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
$(document).ready(function(){
 
		    $(".buttons").click(function () {
		    var divname= this.value;
		      $("#"+divname).show("slow").siblings().hide("slow");
		    });
 
});
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<div id="buttonsDiv"> 
<input data-href="http://www.google.com/" type="button" id="button1" class="buttons" value="div1"></input>
<input data-href="http://www.google.com/" type="button" id="button2" class="buttons" value="div2"></input>
<input data-href="http://www.google.com/" type="button" id="button3" class="buttons" value="div3"></input>
<input data-href="http://www.google.com/" type="button" id="button4" class="buttons" value="div4"></input>
</div>
 
<div>
<div id="div1" style="display:none">
Hello World
</div>
 
<div id="div2" style="display:none">
Test
</div>
 
<div id="div3" style="display:none">
Another Test
</div>
 
<div id="div4" style="display:none">
Final Test
</div>
</div>