Vanilla JS to close notification bar in WordPress
Question
I have created a notification bar that is sticky with the Close button. I am using Top Bar Widget in GeneratePress.
I was able to do with the jquery code.
jQuery(document).ready(function($){
$(".close-btn").click(function(){
$(".top-bar").hide();
});
});
Is there any way to close the notification bar with Vanilla JS?
0
widgets
3 years
2020-07-19T09:10:43-05:00
2020-07-19T09:10:43-05:00 0 Answers
31 views
0
Leave an answer