Skip to content

Idea: auto centering window #2

Open

Description

@jbanety

How to center the window automatically ?

Activity

  1. farsider commented on Apr 2, 2012

    @farsider

    replace

    try{
    var offsetTop = this.options.offsetTop || 40;
    $("gyomModal").setStyles({
    top: offsetTop,
    left: ((window.getCoordinates().width - $("gyomModal").getCoordinates().width)/2 )
    });
    } catch(err){}
    return;


    with

    try{
    var offsetTop = this.options.offsetTop;
    $("gyomModal").setStyles({
    top: ((window.getCoordinates().height - $("gyomModal").getCoordinates().height)/2 ),
    left: ((window.getCoordinates().width - $("gyomModal").getCoordinates().width)/2 )
    });
    } catch(err){}
    return;


  2. HTMLGuyLLC commented on Jun 23, 2015

    @HTMLGuyLLC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions