slideUp read messages

This commit is contained in:
Oskar Hahn 2012-04-17 14:45:25 +02:00
parent 56f1a15cac
commit 0a8d40e2ac
3 changed files with 5 additions and 3 deletions

View File

@ -23,6 +23,7 @@
<p>{%trans "Results of" %} {{ ballot }}. {%trans "Vote" %}</p>
<i>-1 := {% trans 'majority' %}, -2 := {% trans 'undocumented' %}</i>
<form action="" method="post" class="small-form">{% csrf_token %}
{{ pre_form }}
<span id="poll_id" style="display:none">{{ poll.id }}</span>
<table class="table" style="width: auto;">
<tr>

View File

@ -14,7 +14,8 @@ $(function () {
function new_message(text, type) {
message = $('#dummy-notification').clone(true);
$(message).show().addClass(type).children('em').html(text);
var message = $('#dummy-notification').clone(true);
$(message).removeAttr('id').addClass(type).children('em').html(text);
$('#notifications').append(message);
message.slideDown('fast');
}

View File

@ -67,7 +67,7 @@
{% endfor %}
<script>
$("div.notification").click(function () {
$(this).hide("fast");
$(this).slideUp("fast");
});
</script>
</div>