Skip to content

2 bugfixes for image loading #5

Description

@manuel-84

first, encode the src because filenames with strange characters are not displayed during slider animation:

imgParam.backgroundImage = 'url(' + encodeURI($item.find( 'img' ).attr('src')) + ')';

second, setting the real size of image when all images are loaded

                // get real size of image
                var i = new Image();
                i.src = $current.find( 'img' ).attr( 'src' );
                i.onload = function() {
                    self.$el.css( {
                        'max-width' : this.width
                    } );
                }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions