开发四年只会写业务代码,分布式高并发都不会还做程序员?->>>
我今天第一次使用wBox来弹框,感受一下它的魅力
先上代码:
html中代码:
<div id="show_box" style="display: none; width: 500px;height: 400px">shddhdjk</div>
<input type="button" value="点击" id="test" />
JS代码:
$(function() {
$("#test").click(function() {
$('#test').wBox({
target : "#show_box",
title : "选择维度和属性",
drag:false
});
});
});
魅力我是感受到了,但是我写的吧有两个地方有疑问:
第一,我每次第一次都得点击两下按钮,那个窗口才能弹的出来,以后的就好了,很是别扭
第二,上面的代码是按钮触发事件弹框的,那么我要是在jquery的一个函数中怎么将这个框弹出来呢?比如,我测试了一下在easyUI中随便一个handler : function(){}方法中,我就不知道该怎么将这个框自动弹出来了。
比如代码:
$("#main").dialog({
modal : true,
iconCls : 'icon-tip',
title : '指标展示菜单',
width : 900,
height : 380,
closable : false,
toolbar : [ {
text : '添加新指标',
iconCls : 'icon-add',
handler : function() {
//通过wBox将div显示出来
。。。。。。?????????
}
} ]
});
求大神解决! 很是感动!