我有一个关于响应式设计和图像的问题。
这个 javascript 会导致浏览器同时加载“small.jpg”和“big.jpg”吗?
if (condition1) {
//with jQuery im setting the source for the img tag
$(this).attr('src', 'small.jpg');
} else if (condition2) {
//with jQuery im setting the source for the img tag
$(this).attr('src', 'big.jpg');
}
亲切的问候