nycto / picomodal Goto Github PK
View Code? Open in Web Editor NEWA small, self-contained JavaScript modal library. Plain, vanilla JS.
License: MIT License
A small, self-contained JavaScript modal library. Plain, vanilla JS.
License: MIT License
the options() method does not return the instance and also does not update the modal with the new options
This package is in npm yet is entirely incompatible with it. It either needs an index.js
file that links to src/picoModal
or a main element in the package.json that does that same.
Also, the UMD that the file is wrapped in works great with AMD but not with Node or Browserify. Check out https://github.com/umdjs/umd/blob/master/returnExports.js as I think this is the one you want (keeps working with window and AMD and adds in Browserify support).
Disappointing as think library is exactly what I need
When trying to load the minified picoModal-3.0.0.min.js version in Shopify I get the following error
Refused to execute https://vue-dawn.myshopify.com/assets/picoModal-3.0.0.min.js as script because "X-Content-Type-Options: nosniff" was given and its Content-Type is not a script MIME type
picoModal({
content: "Ah, the pitter patter of tiny feet in huge combat boots.",
overlayStyles: {
backgroundColor: "#169",
opacity: 0.75
}
}).show();
I love the way it work. But is there any way we can load the data in Content from different files i mean with like
picoModal({
content: "content.html",
overlayStyles: {
backgroundColor: "#169",
opacity: 0.75
}
}).show();
This would be great.
Internet Explorer 9 and 10 supports both attachEvent and addEventListener handlers
http://msdn.microsoft.com/en-us/library/ie/ms536343%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/ie/ff975245%28v=vs.85%29.aspx
But IE9,10 Event object has no target property, so if you want to use attachEvent you need to use also event.srcElement instead of event.target
TypeError: closeButton is undefined
closeElem: closeButton.elem,
occurs when 'closuButton' options is false and in lines 183-210 there is:
var closeButton;
if (options.closeButton) {
// ...
}
return {
closeElem: closeButton.elem,
};
Obviously, closeButton.elem is undefined.
Since a page can be navigated by keyboard, pressing [enter] or [space] will continue to create more instances of the same modal. For example, attach the modal to an onclick
event listener, and pressing [enter] to click the button multiple times will result in multiple modals overlayed on top of each other. A solution would be to change the focus
to the modal when created.
It hoped for the modal to have a callback function for 'success' (user clicked ok) and a different callback for cancel (user does not want to continue with the action). Much like in the native js dialog box. Would it be possible to do this?
Can you add it? I mean:
picoModal({content: 'some content', height: 300});
When a content bigger than a window's size there'll be a scrollbar. How about this?
I've been using PicoModal for forms, so I added an option to disable closing on shadow-clicks:
https://github.com/codementum/PicoModal/commit/5e39d8319555e4eb0b6595e18833ac702f44cfe5
If you try to open a modal in a mobile device or a table the modal isn't shown property.
hey,
i noticed that the way pico shows/hides the modal is via display:none/block
property.
this method is very expensive since it involves DOM redraw.
i've read how-to-achieve-60-fps-animations-with-css3
and would be great to switch to transform
and opacity
way of doing things.
I figured this should work but it doesn't seem to. Clicking the overlay still closes it.
picoModal({
content:"Some text",
closeButton: false,
overlayClose: false
}).show();
jsfiddle links in readme.md are not working
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.