Safari chooses wrong resolution image: srcset + jquery
up vote
0
down vote
favorite
I have several div
s that are populated with simmilar content using jQuery (v 3.3.1). One of the div
's elements is an image with srcset
for high resolution screens. Chrome and Firefox render the code correctly, but Safari doesn't select the high resolution image when viewing on 4K screen (tested on v 12.0.1).
If I write the code directly in HTML - it works fine, so the issue seems to be with rendering content using jQuery.
Any ideas on how to fix it in Safari?
See my JSFiddle for reference.
jquery html safari srcset
New contributor
add a comment |
up vote
0
down vote
favorite
I have several div
s that are populated with simmilar content using jQuery (v 3.3.1). One of the div
's elements is an image with srcset
for high resolution screens. Chrome and Firefox render the code correctly, but Safari doesn't select the high resolution image when viewing on 4K screen (tested on v 12.0.1).
If I write the code directly in HTML - it works fine, so the issue seems to be with rendering content using jQuery.
Any ideas on how to fix it in Safari?
See my JSFiddle for reference.
jquery html safari srcset
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have several div
s that are populated with simmilar content using jQuery (v 3.3.1). One of the div
's elements is an image with srcset
for high resolution screens. Chrome and Firefox render the code correctly, but Safari doesn't select the high resolution image when viewing on 4K screen (tested on v 12.0.1).
If I write the code directly in HTML - it works fine, so the issue seems to be with rendering content using jQuery.
Any ideas on how to fix it in Safari?
See my JSFiddle for reference.
jquery html safari srcset
New contributor
I have several div
s that are populated with simmilar content using jQuery (v 3.3.1). One of the div
's elements is an image with srcset
for high resolution screens. Chrome and Firefox render the code correctly, but Safari doesn't select the high resolution image when viewing on 4K screen (tested on v 12.0.1).
If I write the code directly in HTML - it works fine, so the issue seems to be with rendering content using jQuery.
Any ideas on how to fix it in Safari?
See my JSFiddle for reference.
jquery html safari srcset
jquery html safari srcset
New contributor
New contributor
New contributor
asked 3 hours ago
Olga
11
11
New contributor
New contributor
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Olga is a new contributor. Be nice, and check out our Code of Conduct.
Olga is a new contributor. Be nice, and check out our Code of Conduct.
Olga is a new contributor. Be nice, and check out our Code of Conduct.
Olga is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53370623%2fsafari-chooses-wrong-resolution-image-srcset-jquery%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown