0
我有一個HTML代碼,當我點擊那個按鈕時,我有一個晶圓浮動按鈕,我想打開一個模態彈出窗口,但我不知道該怎麼做。如何使用Javascript打開模態
的index.html
<html>
<head>
<link rel="stylesheet" href="dist/css/kc.fab.css"/>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
</head>
<body>
<h1 style="text-align: center;">Materialize Floating Action Button - jQuery plugin</h1>
<h2 style="text-align: center;">Please feel free to use and contribute! :)</h2>
<div class="kc_fab_wrapper" >
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="dist/js/kc.fab.min.js"></script>
<script>
$(document).ready(function(){
var links = [
{
"bgcolor":"red",
"icon":"+"
},
{
"url":"http://www.example.com",
"bgcolor":"red",
"color":"#fffff",
"icon":"<i class='fa fa-phone'></i>",
"target":"_blank"
},
{
"url":"http://www.example.com",
"bgcolor":"black",
"color":"white",
"icon":"<i class='fa fa-music'></i>"
}
]
$('.kc_fab_wrapper').kc_fab(links);
})
</script>
</body>
更多下面的演示是有幫助的 http://www.jqueryscript.net/menu/Material-Design-Floating-Action-Button-with-jQuery-KC-FAB.html
我想從工廠按鈕打開模態不是母按鈕而是從子按鈕 –
你看看小提琴?我在示例中包含了一個FAB按鈕。以下是materializecss網站http://materializecss.com/buttons.html#floating上的FAB按鈕的直接鏈接。您可以通過格式化href屬性值來使任何按鈕打開模式,如 –
嘿所有工作正常,但是當我將光標移動到浮動按鈕時它不顯示任何效果現在要做什麼,請幫助.... –