GithubHelp home page GithubHelp logo

Comments (6)

thecodeholic avatar thecodeholic commented on August 31, 2024

Thank you for submitting issue.

This will be solution for the moment, but in next update I will add this feature.

Lobibox.confirm({
    msg: "Are you sure you want to delete this user?",
    shown: function(lobibox){
        setTimeout(function(){
            lobibox.$el.css('left', '50%').css('margin-left', '-'+(lobibox.$el.width()/2)+'px');
        }, 30);
    }
});

from lobibox.

wpmonks avatar wpmonks commented on August 31, 2024

This works fine.

Also, is there a way to give width in % so that the alert is responsive. When the screen is resized the alert aligns to center but if the screen is resized to the width smaller than alert, then the alert doesn't resize itself to fit in window.

It should automatically resize itself and increase it height to fit the content.

Is it possible to achieve this.

Thank you so much for awesome support.

from lobibox.

thecodeholic avatar thecodeholic commented on August 31, 2024

Hi,

Actually its responsive. It does not change on resize, but if you resize
screen to very small size and then open messagebox you will see the result.

If you still need that its width to be changed on resize, let me know.
On Feb 20, 2016 12:21 PM, "wpmonks" [email protected] wrote:

This works fine.

Also, is there a way to give width in % so that the alert is responsive.
When the screen is resized the alert aligns to center but if the screen is
resized to the width smaller than alert, then the alert doesn't resize
itself to fit in window.

It should automatically resize itself and increase it height to fit the
content.

Is it possible to achieve this.

Thank you so much for awesome support.

β€”
Reply to this email directly or view it on GitHub
https://github.com/arboshiki/lobibox/issues/12#issuecomment-186542022.

from lobibox.

wpmonks avatar wpmonks commented on August 31, 2024

Hi,

Yes, I need the width to be changed on resize.
Let me know how this can be done.

from lobibox.

thecodeholic avatar thecodeholic commented on August 31, 2024

There are two approaches.

  1. You can resize messagebox size proportional to window size. In this case on messagebox shown event you can calculate how many percent is messagebox width according to window width and you can change messagebox width from px to %. Like this lobibox.$el.css('left', '50%').css('margin-left', '-'+(lobibox.$el.width()/2)+'px');.
  2. You need to listen two window resize and compare window width and messagebox width and whenever the messagebox width < window width you can call setWidth method on messagebox and change its size.

from lobibox.

thecodeholic avatar thecodeholic commented on August 31, 2024

to @wpmonks

I have pushed latest commit on github. When window is resized messagebox is always in center and also width is decreased if window width is less then messagebox width.

I am going to mark this issue as marked. Please check it if it works.

Thank you

from lobibox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.