-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmounts.js
More file actions
80 lines (72 loc) · 2.35 KB
/
mounts.js
File metadata and controls
80 lines (72 loc) · 2.35 KB
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
$(document).ready(function(){
$('.insigdesc').tooltipster({
functionBefore: function(instance, helper) {
var $origin = $(helper.origin);
var text = $.trim($origin.text());
if ($origin.data('loaded') !== true) {
$.ajax({
dataType: "json",
url:'mounts.php',
type:'get',
data:{bonus:text},
success: function(response){
// Setting content option
instance.content(response.message);
}
});
$origin.data('loaded', true);
}
}
});
$('.mountpreview').tooltipster({
contentAsHTML: true,
trackTooltip: true,
functionBefore: function(instance, helper) {
var $origin = $(helper.origin);
var text = $.trim($origin.text());
if ($origin.data('loaded') !== true) {
$.ajax({
dataType: "json",
url:'mounts.php',
type:'get',
data:{name:text},
success: function(response){
// Setting content option
instance.content("<img src=\""+response.message.picture+"\">"+response.message.name);
}
});
$origin.data('loaded', true);
}
}
});
$("select#Insignias").change(function() {
if($(this).val() != "") {
$("select#Names").prop("disabled", true);
$("select#Types").prop("disabled", true);
}
else {
$("select#Names").prop("disabled", false);
$("select#Types").prop("disabled", false);
}
});
$("select#Names").change(function() {
if($(this).val() != "") {
$("select#Insignias").prop("disabled", true);
$("select#Types").prop("disabled", true);
}
else {
$("select#Insignias").prop("disabled", false);
$("select#Types").prop("disabled", false);
}
});
$("select#Types").change(function() {
if($(this).val() != "") {
$("select#Names").prop("disabled", true);
$("select#Insignias").prop("disabled", true);
}
else {
$("select#Names").prop("disabled", false);
$("select#Insignias").prop("disabled", false);
}
});
});