paulkr / overhang.js Goto Github PK
View Code? Open in Web Editor NEW🔔 A jQuery plugin for notifications, prompts and confirmations.
Home Page: https://paulkr.github.io/overhang.js
License: MIT License
🔔 A jQuery plugin for notifications, prompts and confirmations.
Home Page: https://paulkr.github.io/overhang.js
License: MIT License
In my app (Chrome Extension) a long-ish (3s) duration is necessary but can get in the way after a while - would like it to be "dismissable" early. I tried adding both duration and confirmClose options but confirmClose overrides duration. I tried to modify the code to allow this but my Javascript Fu is weak. Would be sweet to just click anywhere on the overhang to dismiss it or on $close if it's present before the duration runs out.
I can't run it with Bootstrap 4, have you found a similar problem like me?
UPDATE: problem solved
Hi,
I tried overHang this morning (which is damn' nice) and i got some trouble with accented characters who's converted to html entities.
I suggest you to use p.html() instead p.text() to deal with it.
See ya!
This package doesn't have a default file set. You can set it via jsdelivr
, browser
, or main
field in package.json
Just curious. Looked at the source code, and I liked how you formatted it. E.g. in css the ':' are vertically simmetrical. How did you do that? Did you use any tool? I couldn't find any. It really helps with readability
Sorry about that! I didn't update these as I thought they'd auto-generate when merged into master
as part of your deployment. :)
So according to this:
https://npm.runkit.com/overhang
overhang lists no main file and has no index.js, so it can't be directly required.
and I think the way to solve it is to declare the main
declaration in your package.json
Hope this is the right place for suggestions :s
How do I add a button on prompts? Something like "confirm?"
Hi and thank you for this nice lib!
I'm using it from npm and overriding the CSS to use my own fonts. Problem is that the base CSS downloads the Roboto font that I'm not using at all.
While I know that I can simply not include the CSS and make up my own file, I was wondering if you'd consider adding an option to select the font instead. That would make it easier to upgrade for the user.
Can you add bower?
Hi folks, how would I use jquery to programmatically close an overhang that is already open by clicking anywhere on the overhang itslef. I'm doing the below ( 1. finding the overhang by its class, and 2. creating a click event on overhang's close button), and while its working I suspect its a poor method since its throwing some jquery errors and its not very elegant.
$('.overhang-overrides').on('click', function(event){ $('.overhang-close').trigger('click'); });
Could you please tell me how can I make the notification appear automatically whenever someone visit the page, instead of appear throughout click on the button?
Related to #27
Opening as it was not solved.
Issue was How to add a button to a "prompt" type message, not "confirm" type message.
How can I add duration time and close cross when I use custom mode? Error occurs if I do so.
custom: true,
textColor: "#FFFAFA",
primary: "#222222",
accent: "#555555",
message: "Across the Great Wall we can reach every corner in the world."
duration: 10,
closeConfirm: true
});
Hi - great work ! Any thoughts on best way to get a typewriter effect on the text of overhang notification? Using a lib such as: https://github.com/tameemsafi/typewriterjs ..
Thanks for insights or caveats..
update
Sorry, this can be closed ; a bit of investigation resolves this: simply use a span element in the message content and then reference this span or div with whatever typewriter library you may be using.. Worked for me with aforementioned library.
Hi, I use XAMP, all work fine but "overlay: true" didn´t
I open overhang/index to see the examples, all work but overlay not workin here too
Hi,
I got 2 issues in the course of my use:
1. when I include bootstrap.css file, the close icon X will not show. It means if closeConfirm: true, user will have no where to click to close the notify.
2. Based on issue #4, I saw you added html: true to solve it. It did work when I use overhang.js, but seems still not work the mini file: overhang.min.js.
BTW, the version of bootstrap.css is 3.3.5, and the browser is Firefox v36.0.4.
Anyway thank you for sharing this pretty plugin 😊!
Dear paulkr,
thanks first for your awesome library!
I'd like to have an option, where the notification is inserted on top of the page (instead of overhang).
If you could point me in the right direction about what should be implemented to achieve this, I could try myself.
As far as I can tell, only line 165 of overhang.js needs to be changed. From append() to sth. like insertBefore().
Best regards,
OliEfr
$("body").overhang({ custom: true, primary: "#be380a", accent: "rgb(150, 44, 8)", type: "error", message: message, duration: 1.8, upper: true });
message = operación or operación
in first case operación look like OPERACIóN and last case OPERACIÓN
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.