| 8 |
lars |
1 |
function basename(path) {
|
|
|
2 |
return path.split('/').reverse()[0];
|
|
|
3 |
}
|
|
|
4 |
|
|
|
5 |
function changeImage(targetID,src,hdl,hrefID) {
|
|
|
6 |
|
|
|
7 |
//document.getElementById(targetID).src = src;
|
|
|
8 |
//alert();
|
|
|
9 |
//document.getElementById(hrefID).href = hdl;
|
|
|
10 |
$('#'+targetID).attr("src",src);
|
|
|
11 |
$('#'+hrefID).attr("href",hdl);
|
|
|
12 |
|
|
|
13 |
}
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
// ME: Button hover effekt
|
|
|
17 |
$('.butt_hover').mouseenter(function(){
|
|
|
18 |
var button = basename ($(this).attr("src"));
|
|
|
19 |
var button_split = button.split(".");
|
|
|
20 |
button_2 = button_split[0] + "_2." + button_split[1];
|
|
|
21 |
$(this).attr("src","/images/webelemente/" + button_2);
|
|
|
22 |
});
|
|
|
23 |
$('.butt_hover').mouseleave(function(){
|
|
|
24 |
var button_path = $(this).attr("src");
|
|
|
25 |
var button_1 = button_path.replace("_2.",".");
|
|
|
26 |
$(this).attr("src",button_1);
|
|
|
27 |
});
|