How can I redirect after toastr notification
<p>I'm trying to redirect after toastr notification finishes displaying. I currently have ajax request as </p>

<pre><code> $.ajax({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="_token"]').attr('value')
            },
            type: $(form).attr('method'),
            url: $(form).attr('action'),
            data: $(form).serialize(),
            dataType: 'json',
            success: function (data) {
                toastr.success('Hello','Your fun',{timeOut: 2000,preventDuplicates: true, positionClass:'toast-top-center'});


                     return window.location.href = '/';

            },
            error: function (data) {
                    var html = '&lt;div class="alert alert-danger"&gt;Email/Password is invalid&lt;/div&gt;';
                    $('#loginMsg').html(html);
            }
</code></pre>

<p>The problem is it shows the notification but redirects to quickly to actual read the notification. How can I redirect only after toastr notification hides?</p>