Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
8 lars 1
$(document).ready(function(){
2
 
3
    // itemBox bei mouseover öffnen
4
    $('.addonItems').delegate( ".box_addons", "mouseenter", function(event) {
5
        var addonId = $(this).attr('id');
6
        var expl = addonId.split('_');
7
        var id = expl[1];
8
        var contentOffset = $(".content").offset();
9
        var parentOffset = $(this).offset();
10
        var itemZoomWidth = $('#'+id).width();
11
        var itemZoomHeight = $('#'+id).height();
12
 
13
        $('.addonItemZoom').hide();
14
        $('#'+id).css("left", parentOffset.left - contentOffset.left - (itemZoomWidth /2));
15
        $('#'+id).css("margin-top", 0 - (itemZoomHeight/2));
16
        $('#'+id).show();
17
 
18
        $('#'+id).mouseleave(function(){
19
            $('#'+id).hide();
20
        });
21
    });
22
    // und wieder schliessen.. http://www.hazet-freak.de/?item=13694
23
 
24
 
25
    // itemBox bei mouseover öffnen
26
    $('.addonItems_click').delegate( ".box_addons", "click", function(event) {
27
        var addonId = $(this).attr('id');
28
        var expl = addonId.split('_');
29
        var id = expl[1];
30
        var contentOffset = $(".content").offset();
31
        var parentOffset = $(this).offset();
32
        var itemZoomWidth = $('#'+id).width();
33
        var itemZoomHeight = $('#'+id).height();
34
 
35
        $('.addonItemZoom').hide();
36
        $('#'+id).css("left", parentOffset.left - contentOffset.left - (itemZoomWidth /2));
37
        $('#'+id).css("margin-top", 0 - (itemZoomHeight/2));
38
        $('#'+id).show();
39
 
40
        $('#'+id).mouseleave(function(){
41
            $('#'+id).hide();
42
        });
43
    });
44
 
45
    $('.addon_items_close').click(function(){
46
        $('.addonItemZoom').hide();
47
    });
48
 
49
});