Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css div background image loading

if (settings.appear) {
    var elements_left = elements.length;
    settings.appear.call(self, elements_left, settings);
}
var loadImgUri;
if($self.data("background"))
    loadImgUri = $self.data("background");
else
    loadImgUri  = $self.data(settings.data_attribute);

$("<img />")
    .bind("load", function() {
        $self
            .hide();
        if($self.data("background")){
            $self.css('backgroundImage', 'url('+$self.data("background")+')');
        }else
            $self.attr("src", $self.data(settings.data_attribute))

        $self[settings.effect](settings.effect_speed);

        self.loaded = true;

        /* Remove image from array so it is not looped next time. */
        var temp = $.grep(elements, function(element) {
            return !element.loaded;
        });
        elements = $(temp);

        if (settings.load) {
            var elements_left = elements.length;
            settings.load.call(self, elements_left, settings);
        }
    })
    .attr("src", loadImgUri );
}
Comment

PREVIOUS NEXT
Code Example
Css :: scrollbar width css 
Css :: backface-visibility sass 
Css :: get api url for javascript 
Css :: Creating DEV logo with CSS 
Css :: fade color towards top css 
Css :: make td match display flex 
Css :: outline letters in sass 
Css :: css popover arrow divi menu 
Css :: how to fix the html on tablet movement 
Css :: why use 0.5rem 0 in margin in css 
Css :: button size css 
Css :: wordpress localhost css not working 
Css :: hard cutoff gradient 
Css :: mcq on advanced css 
Css :: css animation left 
Css :: prevent the blue highlighting on mobile 
Css :: framework css 
Css :: box align css 
Css :: scss transition mixin 
Css :: enlarge icon when hover 
Typescript :: remove dots from ul li 
Typescript :: Require statement not part of import statement.eslint@typescript-eslint/no-var-requires 
Typescript :: json-server : File C:UsersROUSHAN SHARMAAppDataRoaming pmjson-server.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see 
Typescript :: object iteration in typescript 
Typescript :: react native children type 
Typescript :: Create an ordered list of the top 3 things cats hate the most. 
Typescript :: typescript loop 
Typescript :: Define a list of optional keys for Typescript Record 
Typescript :: oclif text 
Typescript :: print list without brackets int python 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =