这是我的代码:
$(function() {
$('#fadeinright').waypoint(function(direction) {
if (direction === 'down') {
$(this).removeClass("fadeinright");
}
});
$('#fadeinleft').waypoint(function(direction) {
if (direction === 'down') {
$(this).removeClass("fadeinleft");
}
});
$('#fadeintop').waypoint(function(direction) {
if (direction === 'down') {
$(this).removeClass("fadeintop");
}
});
$('#fadeinbottom').waypoint(function(direction) {
if (direction === 'down') {
$(this).removeClass("fadeinbottom");
}
});
$('#simplefadein').waypoint(function(direction) {
if (direction === 'down') {
$(this).removeClass("simplefadein");
}
});
有人知道如何缩短它吗? 我即将添加更多类,我不确定它是正确的代码方式。
答案 0 :(得分:3)
这是一种方式:
grid.setOnMouseReleased(new EventHandler<MouseEvent> () {
public void handle(MouseEvent me) {
if(!anyAnimating.get()){
//make changes to player data
//receive new panes for the board
//make some gui changes
//play some animations
}
}
});
答案 1 :(得分:3)
我的变种
<div></div>
<table>
<tbody>
<tr><td>1234</td></tr>
<tr><td>abcd</td></tr>
</tbody>
</table>