Git Product home page Git Product logo

jquery-toastmessage-plugin's Introduction

Do you wanna have some toasts ?

jquery-toastmessage-plugin is a JQuery plugin which provides android-like notification messages. The toasted messages arriving on the screen in a seamless and natural way. They may or may not disrupt the user and they are still informative. It's a quite nice way to report info or error to the user.

The plugin is entirely customizable. So you can change the positioning, the required user action, the style and so on.

Overview and Demo

To get some more information and see the toastmessage plugin in action, just click here.

Documentation

An in depth documentation how to use this plugin can be found at the Wiki.

License

jquery-toastmessage-plugin is licensed under the Apache License 2.0. The project is founded by akquinet A.G.

jquery-toastmessage-plugin's People

Contributors

bdelespierre avatar cescoffier avatar daniel-tonn avatar samurailink3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-toastmessage-plugin's Issues

Impossible to close a note on touch-screen-based browser if an element with <a> defined is under the notes's X icon.

Hi.

Tested this on Android's browser on http://akquinet.github.com/jquery-toastmessage-plugin/demo/demo.html . Tapping on (X) on "sticky" notes activates underlying element's <a ..> link.In this case, "Fork it on GitHub"'s link is triggered instead of closing the note.

Seems touch-based browsers are seeking out nearby tags and interpreting the tap as tap on that. Suggest adding A tag to the (X).

jQuery fn

You are doing $.fn.toastmessage which means that you have to do $().toastmessage. But if you remove .fn then you can remove the (). Since you are not attaching it to anything.

I think I remember seeing a way of doing both. Will have to find that out again.

positioning difficult

I'm not able to position the dialogs onto the left side, like top-left, bottom-left, etc. Is this a issue or the author have not provided these options?

Improve the close function passing a parameter

You can improve the close function passing the message object to be closed as a parameter. Just need to rewrite line 144 from:

options.close();

to

options.close(obj);

Now it's possible to customize the close function according to the message itself.

Duplicate Toast

Hi
I use:

$().toastmessage('showWarningToast', "My Message");
But it shows duplicate toast. What's wrong?

Thanks

Issue with multiple positions.

Hi,
When I try to have a toast (non-sticky) on top-left on one page and other (non-sticky) on bottom-left on second page, both toast appear in same position based on which toast is clicked first.
If top one is clicked first, hidden and then I move to second page, the toast on this page (which is supposed to appear at bottom) appears at top and vice versa is also true.
Please suggest the fix.

Nuget Package

Be nice to create a Nuget package so we can save automatically stay to date

loop multiple toast box at same time

Guys,

How to showing multiple toast box at same time? I am not using click function to show the toast box, i am using load a php file every 2 seconds to showing the toast box if there is any notification to the user. But for this script, i can only display 1 box per time. What should i edit the js file to show limit 5 toast box at a same time if there is 5 notifications?

Thanks...

add button

@dbremer-tonn
I want to add a certain button in the pop-up box, then what should I do?

Trouble reply me see! thank you

position and android 2.2 browser

Hi,

the toast notification works really fine in firefox and desktop browsers in general, however on android browser if I set

position : 'top-right'

and scroll down the page the notification appear in the upper part of the page and is not visible. Please note that this happen with android 2.2 browser but not with firefox on desktop, any css/javascript magic to solve this?

Problem in IE 8

Hello,
Plugin works well in Mozila and Chrome.
But in IE 8 only message getting display. Page remain hidden. I am using CI it doesn't load next view.
Please help.

Css top on Internet Explorer

The top of the css property is interpreted differently in Internet Explorer and Firefox.

I used this workaround:

if(navigator.userAgent.match(/MSIE/i))
{
toastWrapAll.css({top: $(window).scrollTop()+'px'});
//toastWrapAll.css({top: document.documentElement.scrollTop});
}

Bye

Passing jQuery objects as message.

Sorry, too lazy for a pull request...

Changing jquery.toastmessage.js line 88 from:

toastItemInner  = $('<div></div>').hide().addClass('toast-item toast-type-' + localSettings.type).appendTo(toastWrapAll).html('<p>'+localSettings.text+'</p>').animate(localSettings.inEffect, localSettings.inEffectDuration).wrap(toastItemOuter);

to:

toastItemInner  = $('<div></div>').hide().addClass('toast-item toast-type-' + localSettings.type).appendTo(toastWrapAll).html ($('<p></p>').append (localSettings.text)).animate(localSettings.inEffect, localSettings.inEffectDuration).wrap(toastItemOuter);

makes it possible to pass a jQuery object or a string as message.

Is there a way to customize the css for a particular message?

I'm trying to create a one instance with different classes for several things (including the toast-item color, padding and alignment, and changing the toast-item-close image).

I've had some difficulty applying a custom class to the javascript, and jQuery's addClass() isn't changing some of those properties.

problem with fade-in & fade-out on IE8

I have found a problem with fade-in & fade-out on IE8 - the box itself works fine, but the close icon appears/disappears abruptly, with no fading effect. Any ideas on how to fix this? Thanks.

Error when trying to use callback functionality

Error: options.close is not a function
Source File: js/jquery.toastmessage.js
Line: 144

This happens when trying to use a callback from the plugin using the following code as taken from the example file and updated for my requirements.

var bup = $.post("softup.asp", {up: "blog"});
$().toastmessage('showToast', {
    sticky   : 'true',
    position : 'top-right',
    type     : 'notice',
    text : 'A New Blog Has Been Published, Please Check The Blog Menu For More Details.',
    close : bup
});

From looking at the examples file this is how the example using a call back was called I have tried adding it as a function etc but cant seem to get it to work in anyway.

Close Error

Hi i used your script, and i found an error on it, on the line 138, you have "obj.parent().remove();" and i think it should be "obj.parent().parent().remove();" because the first option don't remove the ".toast-container", and because of that i was unable to use the scripts below the previous pop-up position.

Regards and thanks for the script!

Image Location

Looking through the documentation, I'm having trouble figuring out where the plugin looks for the images, and how I'd tell the library to look somewhere else.

Is this documented?

loss animation effect in IE

I just test this plugin in IE9 with jquery 1.6 ,it doesnot show the animation fadein and fadeout effect , but I choose IE 9 to open the demo page , the animation works , I really dont know why..

Unable to show popup in aspx pages on VS 2012

Hi,
I'm unable to display the popup in my master page in ASP.NET
The toast related markup:
Undefined symbol $
Kindly Help.

[code]

//

within script tag
this was generated by a function as follows:

public void showmessage(string message, int choice)
{
string type="",script="";
switch(choice)
{
case 1:type="success";
break;
case 2:type="notice";
break;
case 3:type="warning";
break;
case 4:type="error";
break;
}
script="$().toastmessage('showToast',{";
script+="text:'"+message+"',";
script+="sticky:true,";
script+="type:'"+type+"'});";
ScriptManager.RegisterClientScriptBlock(Page,this.GetType(),"Msg",script,true);
//client.RegisterClientScriptBlock(this.GetType(),"Msg",script);
}

[/code]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.