JS:
public void ReadFile(String inputfile) throws FileNotFoundException {
arraylist = new ArrayList<Student>();
File myFile = new File(inputfile);
Scanner sc = new Scanner(myFile);
while (sc.hasNextLine()) {
try {
String[] line = sc.nextLine().split(" ");
arraylist.add(new Student(line[1], line[0], Integer.parseInt(line[2]), ...));
} catch (Exception e) {
System.out.println("Error of some kind...");
continue; // maybe, I dunno.
}
}
}
shuriken 是一张图片。它只发生一次..为什么这不起作用?
答案 0 :(得分:2)
最好使用toggleClass():
$("#gifttwo").on("click", function() {
setInterval(function() {
$("#shuriken").toggleClass("animated wobble");
}, 3000);
});