This time I will show you how to solve the problem of abnormal display after layer.photos() asynchronously modifies the picture address, and how to solve the problem of abnormal display after layer.photos() asynchronously modifies the picture addressNotes What are the actual cases? Let’s take a look at them.
There is a picture in the project that has a preview (using layer.photos()). The picture address needs to be modified asynchronously. However, after a successful modification, the first preview will display the large picture before modification, and the second time after that. Everything is normal.
After trying to modify successfully, calling layer.photos() again has no effect.
jsfile to
loop || parent.on('click', options.img, function(){ pushData(); var othis = $(this), index = othis.attr('layer-index'); layer.photos($.extend(options, { photos: { start: index, data: data, tab: options.tab }, full: options.full }), true); })
I believe you have mastered the method after reading these cases. Please pay attention for more exciting things. Other related articles on php Chinese website!
Related reading:
Summary of the box model in HTML
What should be the baseline of each type of box in HTML? Determine the importance of
The above is the detailed content of How to solve the problem of abnormal display after layer.photos() asynchronously modifies the image address. For more information, please follow other related articles on the PHP Chinese website!