Comments (6)
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.
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.
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.
Hi,
Yes, I need the width to be changed on resize.
Let me know how this can be done.
from lobibox.
There are two approaches.
- 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 thislobibox.$el.css('left', '50%').css('margin-left', '-'+(lobibox.$el.width()/2)+'px');
. - 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.
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)
- Prevent the Duplicate Notification
- Can't edit lobibox prompt while bootstrap modal is open HOT 1
- Website not reachable HOT 2
- npm support
- Lobibox on Mobile
- Does this library has angular directive
- sounds
- lobibox support jquery 3? HOT 3
- desktop notifications based on the Web Notifications spec
- add a type of spin to messagbox
- Notifications close callback
- Window innerHeight Calculation uses incorrect DOM value due to timing issue
- Lobibox and vue2.js
- transfer icon
- Notification not vertically aligned
- Uncaught (in promise) DOMException HOT 5
- Large Notification - Replace image with icon
- Large Notification - Delay
- Large Notification - add image link?
- βaction.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "customData": { "region": "CN", "model": "yeelink-mono1" }, "id": "M1GAxtaW9A0LXNwZWMtdjIVgoAFGA15ZWVsaW5rLW1vbm8xFRQYCDQ1MTAyMzgwFWYA" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ], "requestId": "6529877997918554205" }
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lobibox.