Skip to content

Commit

Permalink
try fix jQuery exception in image scroller
Browse files Browse the repository at this point in the history
  • Loading branch information
RealRaven2000 committed Sep 10, 2024
1 parent 23a5d8e commit 9743a7b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/js/jqueryPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,16 @@ function togglePopup(vis, back, pop, target) {
function () {
var img = new Image();
var soc = $( this ).attr( 'src' );

$( img ).load(
function () {
loadImgs++;
}
).attr( "src" , soc );
try {
$( img ).load(
function () {
loadImgs++;
}
).attr( "src" , soc );
}
catch(ex) {
console.log(`Problem in imageScroller(), src=${soc}`,ex);
}
}
);

Expand Down

0 comments on commit 9743a7b

Please sign in to comment.