Collection of used front-end plug
FontAwesome font
See detailed usage of the site above Examples.
SweetAlert series
Example:
Basic use:
swal("标题","内容","success);
Tip the contents were not in use SweetAlert successfully submitted (done) or failure (error) in Ajax.
This is an updated version of the previous wording
function deleteRecord (recordID) {
Swal ({
title: "you sure you want to delete this product do?" ,
text: "When you delete may not be recovered." , of the type: "warning" , showCancelButton: to true , closeOnConfirm: false , confirmButtonText: "Yes, I want to delete!" , confirmButtonColor: "# ec6c62" , cancelButtonText: "Let me think twice" }, function (isConfirm) { IF (isConfirm!) return ; $ .ajax ({of the type: "POST" , url : "/ Delete /" , Data: { "ID" : the recordID}, Success: function (Data) { var dataobj = $.parseJSON (date);IF (dataObj.status === 0) { // backend deleted successfully swal ( "deleted successfully", dataObj.info, "Success" ); $ ( "p-#" + recordID) .remove () // Delete the row data pages} the else {swal ( "error la ...", dataObj.msg, "error"); // rear delete failed }}, error: function () { // Ajax request fails swal ( " Ao ... "," server wandered off ... "," error " );}})});}
After the update by so write
Swal ({
title: "Write the title here" ,
text: "Here put content" ,
icon: "warning", // here put the icon of the type of (Success, warning, info, error) Buttons: {the Cancel: {text: " Let me think twice " , visible: to true , value: false }, Confirm the: {text:" I just want to delete " .}}}) the then ( function (isConfirm) { IF (isConfirm) {Swal (" you're dead. " , {button: "OK" });
Toastr notice
toastr [ "success"] ( "You have been successfully logged!")
jQueryLazyload lazy loading
Example:
<!DOCTYPE html>
<html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta http-equiv="x-ua-compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>懒加载示例</title> </head> <body> <div> <div><img src="img/0.jpg" alt="" class="lazy" data-original="img/5.jpg" width="600px" height="400px"></div> ... <div><img src="img/0.jpg" alt="" class="lazy" data-original="img/6.jpg" width="600px" height="400px"></div> </div> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> <script src="jquery.lazyload.min.js"></script> <script> $("img.lazy").lazyload({ effect: "fadeIn", event: "click" }) </script> </body> </html>
template
A good management background template
Collection of used front-end plug
FontAwesome font
See detailed usage of the site above Examples.
SweetAlert series
Example:
Basic use:
swal("标题","内容","success);
Tip the contents were not in use SweetAlert successfully submitted (done) or failure (error) in Ajax.
This is an updated version of the previous wording
function deleteRecord (recordID) {
Swal ({
title: "you sure you want to delete this product do?" ,
text: "When you delete may not be recovered." , of the type: "warning" , showCancelButton: to true , closeOnConfirm: false , confirmButtonText: "Yes, I want to delete!" , confirmButtonColor: "# ec6c62" , cancelButtonText: "Let me think twice" }, function (isConfirm) { IF (isConfirm!) return ; $ .ajax ({of the type: "POST" , url : "/ Delete /" , Data: { "ID" : the recordID}, Success: function (Data) { var dataobj = $.parseJSON (date);IF (dataObj.status === 0) { // backend deleted successfully swal ( "deleted successfully", dataObj.info, "Success" ); $ ( "p-#" + recordID) .remove () // Delete the row data pages} the else {swal ( "error la ...", dataObj.msg, "error"); // rear delete failed }}, error: function () { // Ajax request fails swal ( " Ao ... "," server wandered off ... "," error " );}})});}
After the update by so write
Swal ({
title: "Write the title here" ,
text: "Here put content" ,
icon: "warning", // here put the icon of the type of (Success, warning, info, error) Buttons: {the Cancel: {text: " Let me think twice " , visible: to true , value: false }, Confirm the: {text:" I just want to delete " .}}}) the then ( function (isConfirm) { IF (isConfirm) {Swal (" you're dead. " , {button: "OK" });
Toastr notice
toastr [ "success"] ( "You have been successfully logged!")
jQueryLazyload lazy loading
Example:
<!DOCTYPE html>
<html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta http-equiv="x-ua-compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>懒加载示例</title> </head> <body> <div> <div><img src="img/0.jpg" alt="" class="lazy" data-original="img/5.jpg" width="600px" height="400px"></div> ... <div><img src="img/0.jpg" alt="" class="lazy" data-original="img/6.jpg" width="600px" height="400px"></div> </div> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> <script src="jquery.lazyload.min.js"></script> <script> $("img.lazy").lazyload({ effect: "fadeIn", event: "click" }) </script> </body> </html>
template
A good management background template