In this code, the removeImage()
function now includes the Swal confirmation dialog. If the user confirms the removal, the AJAX call to remove the image is executed. If the removal is successful, the image and trash icon are removed from the DOM, and a success message is displayed using SweetAlert. If the removal fails, an error message is shown.
Remember to include the SweetAlert library in your HTML file by including the necessary script files and CSS stylesheets.
Adjust the code and customize the Swal dialogs according to your specific requirements and preferences.
In the updated code, we integrate SweetAlert library to display notifications. Inside the success
function, we use Swal.fire()
to show success or failure messages accordingly. For success, we show an icon, a title, and a success message. For failure, we show an error icon, a title, and an error message.
Similarly, inside the error
function, we display an error message using SweetAlert in case of any errors during the AJAX call.
Make sure to include the SweetAlert library in your HTML file by including the necessary script files and CSS stylesheets.
Adjust the code according to your specific requirements and customize the Swal notifications as needed.
Join Our Import-To-Sell Program & Make A Guaranteed 5% Profit on The Capital Invested Per Import Every Four Months.
The turn around time is based on a cycle of two months to import and two months to sell.
Through our Import To Sell, you tap into our established business and networks to import and sell cars profitably.
The Import-To-Sell program is designed for individuals with enough capital to pay the full price of a car. The minimum starting capital is Ksh 600,000 which is enough to pay for a small car. Partners with lower amounts can discuss with us the modalities of joining us to grow their capital.
The profit can be prorated and paid monthly. Attached is a product paper to give you more details.