Skip to content

Implement breakpoints based on viewport width (or container width) #57

@aymaysinnett

Description

@aymaysinnett

If working for example with bootstrap, it's would be perfect if breakpoints can be based on viewport width.
Suggestion:

  • Add option for viewport width

  • If set to true, use:
    var viewportWidth = window.innerWidth
    || document.documentElement.clientWidth
    || document.body.clientWidth;

    if(object.width >= viewportWidth) {
    source = object.src;
    return false;
    }

  • instead of:
    if(object.width >= window.screen.width) {
    source = object.src;
    return false;
    }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions