Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suppression de jquery du fichier close-alert-box.js #5969

Merged
merged 4 commits into from
Dec 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions assets/js/close-alert-box.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/* ===== Zeste de Savoir ====================================================
Close alert-boxes
---------------------------------
Author: Alex-D / Alexandre Demode
Author: Alex-D / Alexandre Demode, firm1
========================================================================== */

(function($) {
'use strict'

$('.main').on('click', '.close-alert-box:not(.open-modal)', function(e) {
$(this).parents('.alert-box:first').slideUp(150, function() {
$(this).remove()
})
$(this).parents('.markdown-help:first').slideUp(150, function() {
$(this).remove()
})
e.preventDefault()
(function() {
window.addEventListener('DOMContentLoaded', function() {
setTimeout(function() {
Situphen marked this conversation as resolved.
Show resolved Hide resolved
Array.from(document.querySelectorAll('.close-alert-box'))
.forEach(item => {
item.addEventListener('click', function(e) {
this.parentElement.remove()
e.preventDefault()
})
})
}, 1000)
})
})(jQuery)
})()