这是一款兼容ie8的jquery圆形弹出按钮菜单插件。该插件可以制作点击菜单主按钮,弹出一圈子按钮的效果。
使用方法:
在页面中引入 jquery和expandableOptions.js文件和样式文件 expandableOptions.css。
<link rel="stylesheet" href="css/expandableOptions.css">
<script src="path/to/jquery.js"></script>
<script src="path/to/jexpandableOptions.js"></script>
HTML 结构:
使用是创建下面的HTML结构。
<div class="expandableContainer">
<ul id="optionsThreeId" class="expandableOptions">
<li class="option" onclick="alert('option 1 clicked');" title="option 1" option-image="one.png"></li>
<li class="option" onclick="alert('option 2 clicked');" title="option 2" option-image="two.png"></li>
<li class="option" onclick="alert('option 3 clicked');" title="option 3" option-image="three.png"></li>
<li class="option" onclick="alert('option 4 clicked');" title="option 4" option-image="four.png"></li>
<li class="option" onclick="alert('option 5 clicked');" title="option 5" option-image="five.png"></li>
<li class="option" onclick="alert('option 6 clicked');" title="option 6" option-image="six.png"></li>
</ul>
</div>
初始化插件:
在页面DOM元素加载完毕之后,通过下面方法来初始化该插件。
$(document).ready(function () {
$(".expandableOptions").ggExpandable({
// default: "./"
imagesPath: "./img/",
// default: ""
expandImage: "noname.png"
});
});
原文链接:https://www.7zt.cn/447.html,转载请注明出处~~~
评论0