Commit a6dc2027 authored by 神楽坂玲奈's avatar 神楽坂玲奈

editable

parent a0901304
<meta charset="UTF-8">
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="normalize.css"/>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<div class="card">
<img class="card_type" src="mse/data/yugioh-standard.mse-style/card-slifer.png"/>
<span class="name">喵了个咪</span>
<img class="attribute" src="mse/data/yugioh-caicai-levels.mse-symbol-font/水.png"/>
<span class="attribute" data-attribute="water"></span>
<div class="level" data-level="4"></div>
<img class="image" src="shanghai.jpg"/>
<span class="monster_type">【人偶族·卖萌】</span>
......@@ -19,6 +24,8 @@
<span class="atk">123</span>
<span class="def">321</span>
</div>
<link rel="stylesheet" href="normalize.css"/>
<link rel="stylesheet" href="style.css"/>
\ No newline at end of file
<script src="js/vendor/jquery-1.9.1.min.js"></script>
<script src="js/vendor/jquery.jeditable.mini.js"></script>
<script src="js/main.js"></script>
</body>
</html>
\ No newline at end of file
$(document).ready ->
$('.name').editable (value, settings) ->
value
$('.attribute').editable (value, settings) ->
$(this).attr 'data-attribute', value
, {
placeholder:""
data: JSON.stringify {'water': '水', 'fire': '炎'}
type: 'select'
submit : 'OK'
}
// Generated by CoffeeScript 1.6.1
(function() {
$(document).ready(function() {
$('.name').editable(function(value, settings) {
return value;
});
return $('.attribute').editable(function(value, settings) {
$(this).attr('data-attribute', value);
return "";
}, {
placeholder: "",
data: JSON.stringify({
'water': '',
'fire': ''
}),
type: 'select',
submit: 'OK'
});
});
}).call(this);
This diff is collapsed.
This diff is collapsed.
......@@ -28,7 +28,7 @@
}
.card {
body {
position: relative;
width: 421px;
height: 614px;
......@@ -57,7 +57,10 @@
top: 37px;
width: 40px;
height: 40px;
background-size: 40px 40px;
}
.attribute[data-attribute="water"]{background-image: url(mse/data/yugioh-caicai-levels.mse-symbol-font/水.png)}
.attribute[data-attribute="fire"]{background-image: url(mse/data/yugioh-caicai-levels.mse-symbol-font/炎.png)}
.level {
position: absolute;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment