set auto-hide toast javascrpt 1

set auto-hide toast javascrpt

$(".toast").toast({ autohide: false });

Here is what the above code is Doing:
1. We’re using the `$` to select the element with the class `toast`.
2. We’re using the `toast` method to initialize the toast.
3. We’re passing in an object with a property of `autohide` and a value of `false`.

This will make the toast stay on the screen until the user clicks the close button.

## Step 3: Add a button to the toast

We can add a button to the toast by adding the following code to the `

` with the class `toast-body`:

“`html

“`

## Step 4: Add a link to the toast

We can add a link to the toast by adding the following code to the `

` with the class `toast-body`:

“`html
Do something
“`

## Step 5: Add a progress bar to the toast

We can add a progress bar to the toast by adding the following code to the `

` with the class `toast-body`:

“`html

“`

## Step 6: Add a heading to the toast

We can add a heading to the toast by adding the following code to the `

` with the class `toast-body`:

“`html

...
Bootstrap
11 mins ago

“`

## Step 7: Add a close button to the toast

We can add a close button to the toast by adding the following code to the `

` with the class `toast-body`:

“`html

“`

## Step 8: Add a fade animation to the toast

We can add a fade animation to the toast by adding the following code to the `

` with the class `toast`:

“`html

Similar Posts