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"> <div class="card">
<img class="card_type" src="mse/data/yugioh-standard.mse-style/card-slifer.png"/> <img class="card_type" src="mse/data/yugioh-standard.mse-style/card-slifer.png"/>
<span class="name">喵了个咪</span> <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> <div class="level" data-level="4"></div>
<img class="image" src="shanghai.jpg"/> <img class="image" src="shanghai.jpg"/>
<span class="monster_type">【人偶族·卖萌】</span> <span class="monster_type">【人偶族·卖萌】</span>
...@@ -19,6 +24,8 @@ ...@@ -19,6 +24,8 @@
<span class="atk">123</span> <span class="atk">123</span>
<span class="def">321</span> <span class="def">321</span>
</div> </div>
<script src="js/vendor/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="normalize.css"/> <script src="js/vendor/jquery.jeditable.mini.js"></script>
<link rel="stylesheet" href="style.css"/> <script src="js/main.js"></script>
\ No newline at end of file </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 @@ ...@@ -28,7 +28,7 @@
} }
.card { body {
position: relative; position: relative;
width: 421px; width: 421px;
height: 614px; height: 614px;
...@@ -57,7 +57,10 @@ ...@@ -57,7 +57,10 @@
top: 37px; top: 37px;
width: 40px; width: 40px;
height: 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 { .level {
position: absolute; 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