Vorlage:Feedback: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 3: | Zeile 3: | ||
− | {{#tag:button | Finde ich gut! | onclick="like(this, '{{{1}}}', '{{{2}}}')" | class=" | + | {{#tag:button | Finde ich gut! | onclick="like(this, '{{{1}}}', '{{{2}}}')" | class="dankebtn" }} |
{{#tag:script | | {{#tag:script | | ||
Zeile 10: | Zeile 10: | ||
function like(object, thema, author) | function like(object, thema, author) | ||
{ | { | ||
− | if ( ! $(object).hasClass(' | + | if ( ! $(object).hasClass('dankebtn2')) |
{ | { | ||
$.get( "feedback.php", { text:thema, d:author } ).done(function( data ) { | $.get( "feedback.php", { text:thema, d:author } ).done(function( data ) { | ||
$(object).html(' Danke! '); | $(object).html(' Danke! '); | ||
− | $(object).addClass(' | + | $(object).addClass('dankebtn2'); |
}); | }); | ||
} | } |
Version vom 30. Juni 2016, 10:26 Uhr