可能重复:
检测设备是否为 iOS
这是我想做的事情:
<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>
而不是评论我写什么来使它工作?