Greetings to all experts! Please help with the solution of the problem! :) There is such a code:

$(document).ready(function() { /* * Smart Notifications */ $('#eg1').click(function(e) { $.bigBox({ title : "Ошибка!", content : "Это сообщение об ошибке и оно исчезнет через 9 секунд!", color : "#C46A69", icon : "fa fa-warning shake animated", number : "1", timeout : 9000 }); e.preventDefault(); }); }) 

But in this form, it only works when you click on the element with id eg1, how can I redo this code so that it works when outputting to the page via

 <?php echo "ДАННЫЙ КОД"; ?> 

Thank you in advance!

    1 answer 1

     $(document).ready(function() { function ShowBigBox() { $.bigBox({ title : "Ошибка!", content : "Это сообщение об ошибке и оно исчезнет через 9 секунд!", color : "#C46A69", icon : "fa fa-warning shake animated", number : "1", timeout : 9000 }); } /* * Smart Notifications */ $('#eg1').click(function(e) { ShowBigBox(); e.preventDefault(); }); ShowBigBox(); }); 
    • THANK YOU !!! EVERYTHING WORKS AS NEEDED :) - Cinema Trailers