Comments (12)
Hi, where did you get this example?
Events work as a promise!
Take a look:
var options = {
message: "The famous question?",
title: 'Header title',
size: eModal.size.sm,
subtitle: 'smaller text header',
label: 'Yes'
};
eModal
.alert(options)
.then(
function(){ alert(1); },
function(){ alert(2); }
);
Hope that help, see more examples in example site Http://saribe.github.io/eModal
from emodal.
Hi,
Thanks a lot for your help!
That's what I need
Now it's work!
from emodal.
NIce to know,
Please feel free to contact me if you need any further information.
from emodal.
Thanks again for your help.
Another question:
How can I change the colour of the buttons?
I have by default:
Yes = blue
No = red
I need Yes = red
Thanks
var options = {
message: "Do you really want to delete this record?",
title: 'Confirmation',
size: eModal.size.sm,
label: 'Yes'
};
eModal.confirm(options).then(
function(){ alert(1); },
function(){ alert(2); }
);
from emodal.
You can do it in multiple ways:
- Query DOM and change it.
- When you execute eModal.ACTION, it returns a promise and in the
promise object, you will find the modal's DOM element.
- When you execute eModal.ACTION, it returns a promise and in the
e.g.; var promise = eModal
.confirm("Hello")
.then(OKfn, KOfn);
promise.element.find(".btn"); <- this wil return a list of buttons
(.btn class)
- Provide custom buttons.
-
If you provide your buttons in object options, you can define a
,
class
buttons: [
{ close: true, click: callback1, text: "btn-danger", style: "danger"
},
{ close: true, click: callback2, text: "btn-info" style: "info" }, {
close: true, click: callback3, text: "Other", style: " other" }, //<-
notice the space before
{ close: true, click: callback4, text: "CSS", css: {
background-color: 'pink', color: 'blue' } }
],
-
Samuel Ribeiro Pinto
2016-01-25 13:50 GMT+00:00 spilxx [email protected]:
Thanks again for your help.
Another question:
How can I change the colour of the buttons?
I have by default:
Yes = blue
No = redI need Yes = red
Thanks
var options = {
message: "Do you really want to delete this record?",
title: 'Confirmation',
size: eModal.size.sm,
label: 'Yes'
};eModal.confirm(options).then( function(){ alert(1); }, function(){ alert(2); } );
—
Reply to this email directly or view it on GitHub
#31 (comment).
from emodal.
Note: if the ACTION in use, already has buttons (e.g.: prompt), your
custom buttons will be addded on left, this will not replace the "native"
ones.
Samuel Ribeiro Pinto
2016-01-25 15:32 GMT+00:00 Samuel Pinto [email protected]:
You can do it in multiple ways:
- Query DOM and change it.
- When you execute eModal.ACTION, it returns a promise and in the
promise object, you will find the modal's DOM element.e.g.; var promise = eModal
.confirm("Hello")
.then(OKfn, KOfn);promise.element.find(".btn"); <- this wil return a list of buttons
(.btn class)
- Provide custom buttons.
If you provide your buttons in object options, you can define a
,
class
buttons: [
{ close: true, click: callback1, text: "btn-danger", style:
"danger" },
{ close: true, click: callback2, text: "btn-info" style: "info" }, {
close: true, click: callback3, text: "Other", style: " other" },
//<- notice the space before
{ close: true, click: callback4, text: "CSS", css: {
background-color: 'pink', color: 'blue' } }
],Samuel Ribeiro Pinto
2016-01-25 13:50 GMT+00:00 spilxx [email protected]:
Thanks again for your help.
Another question:
How can I change the colour of the buttons?
I have by default:
Yes = blue
No = redI need Yes = red
Thanks
var options = {
message: "Do you really want to delete this record?",
title: 'Confirmation',
size: eModal.size.sm,
label: 'Yes'
};eModal.confirm(options).then( function(){ alert(1); }, function(){ alert(2); } );
—
Reply to this email directly or view it on GitHub
#31 (comment).
from emodal.
[image: Imagem intercalada 2]
Samuel Ribeiro Pinto
2016-01-25 15:35 GMT+00:00 Samuel Pinto [email protected]:
Note: if the ACTION in use, already has buttons (e.g.: prompt), your
custom buttons will be addded on left, this will not replace the "native"
ones.Samuel Ribeiro Pinto
2016-01-25 15:32 GMT+00:00 Samuel Pinto [email protected]:
You can do it in multiple ways:
- Query DOM and change it.
- When you execute eModal.ACTION, it returns a promise and in the
promise object, you will find the modal's DOM element.e.g.; var promise = eModal
.confirm("Hello")
.then(OKfn, KOfn);promise.element.find(".btn"); <- this wil return a list of
buttons (.btn class)
- Provide custom buttons.
If you provide your buttons in object options, you can define a
,
class
buttons: [
{ close: true, click: callback1, text: "btn-danger", style:
"danger" },
{ close: true, click: callback2, text: "btn-info" style: "info" }, {
close: true, click: callback3, text: "Other", style: " other" },
//<- notice the space before
{ close: true, click: callback4, text: "CSS", css: {
background-color: 'pink', color: 'blue' } }
],Samuel Ribeiro Pinto
2016-01-25 13:50 GMT+00:00 spilxx [email protected]:
Thanks again for your help.
Another question:
How can I change the colour of the buttons?
I have by default:
Yes = blue
No = redI need Yes = red
Thanks
var options = {
message: "Do you really want to delete this record?",
title: 'Confirmation',
size: eModal.size.sm,
label: 'Yes'
};eModal.confirm(options).then( function(){ alert(1); }, function(){ alert(2); } );
—
Reply to this email directly or view it on GitHub
#31 (comment).
from emodal.
Hi Samuel,
Thanks again for your time & valuable help.
from emodal.
Hi saribe,
I am using eModal,
i had one issue, after turboboost transaction (on clicking on the turboboost link), emodal is not working,
i tried from even browser console also eModal.alert(''), but it didnt worked.
please can u help me on this.
Thanks
from emodal.
Am I being stupid but I cannot see any way to get the value that is typed into the prompt box. it has no id so I don't know how to reference it. Any help very much appreciated.
eModal.prompt(options)
.then(
function () { alert("?? PROMPT VALUE ???"); }
);
from emodal.
from emodal.
from emodal.
Related Issues (20)
- eModal.prompt return value HOT 1
- This project is abandoned
- how to make emodal resizable HOT 1
- Controlling the size of the iframe HOT 1
- eModal AJAX call eModal confirm, confirm cannot be closed HOT 1
- eModal.alert doesn't show after eModal.confirm HOT 3
- Bootstrap 4 issue HOT 1
- Dynamic load scripts not working with eModal. HOT 3
- npm package
- Fix for Bootstrap 4.1.3 and Jquery 3.3.1 HOT 2
- Open iframe error
- How to use loading modal
- success callback fired twice in ajax method HOT 1
- iframe function does not return modal $Dom Element
- JS code not executed on the first call of eModal.ajax HOT 3
- close
- Bootstrap 5.0.x
- translate confirm modal button
- size xl
- accessibility role=dialog etc
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 emodal.