-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能不能把已有的div弹出来? #65
Comments
Element 参数— On Fri, Jun 27, 2014 at 12:06 PM, zhishaofei notifications@github.com
|
content: '#elementId' |
放在页面下部的HTML,是我自己写的一个登录框: <div class="popup login">
<div class="header">
<span class="close-wrapper">
<span class="close">×</span>
</span>
<div class="tip">无需账号,直接使用合作账号登录</div>
<div class="login-qq"></div>
</div>
<div class="content">
<form action="#">
<div class="username-wrapper">
<label for="login-username">用户名:</label>
<input type="text" id="login-username" required />
</div>
<div class="password-wrapper">
<label for="login-password">密码:</label>
<input type="password" id="login-password" required />
</div>
<label class="save-password-wrapper">
<input type="checkbox" class="save-password">记住密码
</label>
<a class="forget" href="javascript:;">忘记密码</a>
<button class="login-btn" type="submit"></button>
</form>
<div class="ljzc">
没有账号, <a href="javascript:;">立即注册</a>
</div>
</div>
</div> 调用: loginDialog = new Dialog({
content: ".login",
closeTpl: ""
});
console.log(loginDialog.content);//undefined 页面中有.login 元素 ,但是content输出undefined, $(".login").show();
loginDialog.show(); 我通过loginDialog取content又是undefined,所以不太明白怎么做了。 |
|
loginDialog.get("content").show();
loginDialog.show(); 哦!原来是我用错了。 var Dialog = Dialog.extend({
show: function() {
Dialog.superclass.show.call(this);
this.get("content").show();
}
});
loginDialog.show(); 明白了,谢谢大虾!!! |
loginDialog.before('show', function() {
this.get("content").show();
}); |
能不能把已有的div弹出来?而不是通过content的形式
The text was updated successfully, but these errors were encountered: