1
这是我想做的事:
<script type="text/javascript">
// Run This code if device is iOS based
window.addEventListener('DOMContentLoaded',function() {
$("body").queryLoader2({
barColor: "#37201b",
backgroundColor: "#c2a875",
percentage: true,
barHeight: 5,
completeAnimation: "grow"
});
});
// if it is not iOS run this code
$(document).ready(function() {
$("body").queryLoader2({
barColor: "#37201b",
backgroundColor: "#c2a875",
percentage: true,
completeAnimation: "grow",
barHeight: 5
});
});
</script>
相反的意见我怎么写,使其工作?
更好的问题:为什么你只想在iOS上运行,你应该使用功能检测而不是操作系统检测? – Blazemonger 2012-08-17 13:16:52
@Blazemonger no no,我只需要一部分来检测iOS – Ilja 2012-08-17 13:20:10