出现toastr消息框但没有文本

时间:2015-06-06 15:44:18

标签: javascript jquery jquery-ui toastr

我有以下代码:

<script>
    $(function () {
        Command: toastr["success"]("My name is Inigo Montoya. You killed my father. Prepare to die!")
    });
</script>

该框显示但是它是空白的并且没有文字。我该如何解决?我尝试添加以下命令:

    toastr.options = {
      "closeButton": true,
      "debug": false,
      "newestOnTop": false,
      "progressBar": false,
      "positionClass": "toast-top-center",
      "preventDuplicates": false,
      "onclick": null,
      "showDuration": "300",
      "hideDuration": "1000",
      "timeOut": "5000",
      "extendedTimeOut": "1000",
      "showEasing": "swing",
      "hideEasing": "linear",
      "showMethod": "fadeIn",
      "hideMethod": "fadeOut"
    }

但它所做的只是将盒子放在中心位置。如何显示文字?

1 个答案:

答案 0 :(得分:0)

您必须删除Command:块。