Comments (6)
@sangyoo91 Sorry for not having created an official README but this package is a wrapper to the codrops
dialog-effects package https://github.com/codrops/DialogEffects. You would use it in a similar fashion but I have modified the source code slightly to allow for explicit open and close
functionality.
Example:
var $mainDlg = $('#dialog');
var dlg = new DialogFx($mainDlg);
dlg.open(); // to open the dialog
dlg.close(); // to close the dialog
To create the dialog, I rendered a template using Blaze.render
into any existing DOM element using the following markup.
<div id="somedialog" class="dialog">
<div class="dialog__overlay"></div>
<div class="dialog__content">
<h2><strong>Howdy</strong>, I'm a dialog box</h2><
div><button class="action" data-dialog-close>Close</button></div>
</div>
</div>
from dialog-effects.
@warsamebashir Thank you so much! I'm still fairly new to Meteor. Would it work if I used, for say, {{> dialogConfirm}} and insert it to a template ?
from dialog-effects.
'click .delete': function() {
var $mainDlg = $('#dialog');
var dlg = new DialogFx($mainDlg);
dlg.open();
I am using this on Template.foo.events
but the dialog would not open. Am I doing something wrong?
from dialog-effects.
@sangyoo91 Can you show me your Template and how you are inserting dialogConfirm
? If the template exists and foo
is being rendered, then the div#diailog
element should exist allowing you to create the DialogFx
object. Also check to see if you have any console errors in your browser?
from dialog-effects.
<template name = "foo">
{{ > dialogConfirm }}
<button class = "btn-primary delete">Delete</button>
</template>
This would be a minified thing of what I have now.
{{> dialogConfirm}}
would be
<div id="dialog" class="dialog">
<div class="dialog__overlay"></div>
<div class="dialog__content">
Something Here
<div><button class="action" data-dialog-close>Close</button></div>
</div>
</div>
from dialog-effects.
Are you at the latest version of this package 1.0.4
, from what you have in your example, everything is set up correctly. The DialogFx
object will accept a JQuery element or an HTML element and you can check to make sure dlg
exists to verify object creation. Otherwise, I will need a reproducible project to test in order to further help
from dialog-effects.
Related Issues (1)
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 dialog-effects.