A
A
Artur Zayats2013-05-21 18:53:52
JavaScript
Artur Zayats, 2013-05-21 18:53:52

Pop-up messages like on habré

Can you tell me a JavaScript library for implementing pop-up messages, like on Habré in the upper right corner?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan, 2013-05-21
@zag2art

plugins.jquery.com/jgrowl/
github.com/CodeSeven/toastr
plugins.jquery.com/toast/
for example.

A
Andrey, 2013-05-21
@RedOctoberCZ

Well, this is written on your own in 5 minutes :) Rough and clumsy, but it works.

<div id='error_box' style='display: none; border: 1px solid #f7c7c9; background: #f9e5e6; position: fixed; width: 370px; right: 20px; top: 20px; -webkit-box-shadow: 0px 5px 5px 3px rgba(0, 0, 0, 0.3); box-shadow: 0px 5px 5px 3px rgba(0, 0, 0, 0.3); -webkit-border-radius: 5px; border-radius: 5px; text-align: center;'>

<p id='error_message' style='color: #c77c7e; margin-top: 18px; font-weight: bold;  text-shadow: 1px 1px 1px #FFFFFF; filter: dropshadow(color=#FFFFFF, offx=1, offy=1);'></p>
</div>

<script>
    function throw_message(str) {
        $('#error_message').html(str);
        $("#error_box").fadeIn(500).delay(3000).fadeOut(500);
    }
</script>

<a href='#' onclick='throw_message("Clicked!"); return false;'>Click me!</a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question