• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 add sweetalert javascript

#1
Hello there , I plan to add this javascript alert http://tristanedwards.me/sweetalert
into the xenforo , I open PAGE_CONTAINER and add the files after I uploading the sweetalert files into js folder

<script src="js/lib/sweet-alert.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/lib/sweet-alert.css">

then I try to add the alert code into footer

swal({
title: "Error!",
text: "Here's my error message!",
type: "error",
confirmButtonText: "Cool"
});


still nothing happen , I'm newbie : )
 

HWS

Well-known member
#2
I think you'll need to attach it to a page element with mouse click event to get triggered. But I am not familiar with it, just logical thinking... ;)