0

Использую библиотеку Sweetalert, вот репозиторий на гитхаб https://github.com/t4t5/sweetalert

Нужно добавить в модальное окно ссылку, которая располагалась бы примерно так, как я указал на скриншоте. Насколько я понял, нужно добавлять как-то средствами JS. Подскажите как реализовать. введите сюда описание изображения

0

1 ответ 1

1

Необходимо html добавить true, по умолчанию false

swal({
  title: "Are you sure?",
  text: "text <a href='#'>Link</a>",
  html: true,  
  confirmButtonColor: "#00f",
  confirmButtonText: "Button" 
});

Пример

swal({
  title: "Are you sure?",
  text: "text <a href='#'>Link</a>",
  html: true,  
  confirmButtonColor: "#00f",
  confirmButtonText: "Button" 
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css" rel="stylesheet"/>

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.