2017-07-31 50 views
-5

我爲了使bootstrap notify發揮作用而缺少了哪些部分?如何開始使用Bootstrap通知

我只是找不到錯誤。

jsbin.com/tagohopofo/edit?html,js,output

$(document).ready(function(){ 
 
     $.notify("Hello World"); 
 
    });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 

 

 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> 
 

 

 
    
 

 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> 
 
    
 
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/bootstrap-notify.min.css" rel="stylesheet" type="text/css" /> 
 

 
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/bootstrap-notify.min.css" rel="stylesheet" type="text/css" /> 
 

 
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/styles/alert-blackgloss.min.css" rel="stylesheet" type="text/css" />

謝謝!

+3

> 4k的代表,仍然張貼鏈接,而不是代碼?你在開玩笑嗎? – Vivick

+0

如果你想要的代碼,我可以提供它 –

+0

尋求調試幫助(「爲什麼不是這個代碼工作?」)的問題必須包括所需的行爲,一個特定的問題或錯誤和最短的代碼重現**自問**。沒有明確問題陳述的問題對其他讀者無益。參見:[mcve] –

回答

1

你需要更新你的的jQuery的版本到最新:

在這裏你可以看到現場演示:https://output.jsbin.com/seqomanera

https://jsbin.com/wapuwuvuze/edit?html,js,output

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width"> 
    <title>JS Bin</title> 
    <script type="text/javascript" src="//code.jquery.com/jquery-2.1.0.js"></script> 
    <script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> 
    <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> 
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/bootstrap-notify.min.css"> 
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/styles/alert-bangtidy.min.css"> 
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/styles/alert-blackgloss.min.css"> 
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/js/bootstrap-notify.min.js"></script> 
    <script type='text/javascript'> 
    $(document).ready(function() { 
     $.notify("Hello World"); 
    }); 
    </script> 
</head> 
<body> 
</body> 
</html>