我的应用程序数据中有一个plist文件,我想每24小时从网络服务器更新一次.有没有办法检查文件上次修改的时间,或者我应该以某种方式注册更新文件的日期和时间,并使用它来比较?
if (lastMod > currentDate){
[arrayFromXml writeToFile:path atomically:YES];
}
Run Code Online (Sandbox Code Playgroud) 使用jQuery,我如何结合$(this)和$("li:eq(ui.item.index())")类似的东西$(this).$("li:eq(ui.item.index())").id?
我试图在使用jQuery UI工具包创建的可排序列表中获取列表元素的id属性
$(".sections-list").sortable({ /* Update position of sortable elements */
start: function(event, ui) {
var start = ui.item.index();
var section = $("li:eq(start)").id;
alert(section);
}
});
Run Code Online (Sandbox Code Playgroud)