Use inline `onload` event instead of jQuery `load`

This commit is contained in:
Kevin Ang 2022-01-12 08:30:05 -06:00 committed by GitHub
parent 159ceb3f35
commit d974373b1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -244,10 +244,7 @@
item = $( '<a></a>' ).attr( 'href', '#' ).text( j );
if (slider.vars.controlNav === "thumbnails") {
item = $('<img/>', {
load: function (el) {
el.currentTarget.width = el.currentTarget.naturalWidth;
el.currentTarget.height = el.currentTarget.naturalHeight;
},
onload: 'this.width = this.naturalWidth; this.height = this.naturalHeight',
src: slide.attr('data-thumb'),
alt: slide.attr('alt')
})