Response title
This is preview!
$(document).ready(function(){
$("a#up").click(function() {
var up = "strong#" + $(this).attr("title");
$(up).html("next number");
});
});
<li>Attack: <strong id='atk'>{$attack}</strong> - <a href='#' id='up' title='atk'>Up</a></li>
<li>Defense: <strong id='def'>{$defense}</strong> - <a href='#' id='up' title='def'>Up</a></li>
function upSkill(s) {
var up = ++document.getElementById(s).innerHTML;
document.getElementById(s).innerHTML=up;
}
<li>Attack: <strong id='atk'>{$attack}</strong> - <a href='#' onclick='upSkill("atk");'>Up</a></li>
<li>Defense: <strong id='def'>{$defense}</strong> - <a href='#' onclick='upSkill("def");'>Up</a></li>
© 2013 jQuery Foundation
Sponsored by and others.