git.schokokeks.org
Repositories
Help
Report an Issue
bibweb.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
697776a
Branches
Tags
master
bibweb.git
assets
notification.js
Ermögliche die Eingabe neuer Kontaktdaten
Bernd Wurst
commited
697776a
at 2026-09-30 11:07:04
notification.js
Blame
History
Raw
function email_click( event ) { // $(this) bezieht sich auf den konkret angeklickten Button (z.B. #btn-email_0) var email = $(this).text().split(' an ').pop().trim(); $('#notification').val('email:' + email); $('form').submit(); event.preventDefault(); } function whatsapp_click( event ) { var number = $(this).text().split(' an ').pop().trim(); $('#notification').val('whatsapp:' + number); $('form').submit(); event.preventDefault(); } function sms_click( event ) { var number = $(this).text().split(' an ').pop().trim(); $('#notification').val('sms:' + number); $('form').submit(); event.preventDefault(); } $(function () { // Event Delegation mit Attribut-Selektor (findet btn-email, btn-email_0, btn-email_1 ...) $(document).on('click', '[id^="btn-email"]', email_click); $(document).on('click', '[id^="btn-sms"]', sms_click); $(document).on('click', '[id^="btn-whatsapp"]', whatsapp_click); });