root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / gp-script.js @ 0fab6d53
History | View | Annotate | Download (1.1 kB)
1 |
$(document).ready(function(){ |
---|---|
2 |
|
3 |
//show selection window of vm_list_v1.html
|
4 |
var elem;
|
5 |
$('.vm_container').find('.img').mouseenter(function(event){ |
6 |
event.preventDefault(); |
7 |
elem = $(this).siblings('.vm_options'); |
8 |
if(elem.length!==0){ |
9 |
elem.slideDown('slow');
|
10 |
elem.removeClass('invisible');
|
11 |
} |
12 |
|
13 |
}); |
14 |
$('.vm_options').mouseleave(function(event){ |
15 |
event.preventDefault(); |
16 |
if(!$(this).hasClass('invisible')) |
17 |
{ |
18 |
elem.slideUp('slow');
|
19 |
elem.addClass('invisible');
|
20 |
} |
21 |
}) |
22 |
|
23 |
//checkbox in selection window of vm_list_v1.html
|
24 |
$('.select').click(function(event){ |
25 |
event.preventDefault(); |
26 |
var checkbox = $(this).find('.custom_checkbox'); |
27 |
if(checkbox.hasClass('checkbox-unchecked')){ |
28 |
checkbox.html('b');
|
29 |
checkbox.removeClass('checkbox-unchecked');
|
30 |
checkbox.addClass('checkbox-checked');
|
31 |
} |
32 |
else{
|
33 |
checkbox.html('a');
|
34 |
checkbox.removeClass('checkbox-checked');
|
35 |
checkbox.addClass('checkbox-unchecked');
|
36 |
} |
37 |
}); |
38 |
|
39 |
}); |