所以我想要实现的是一个弹出窗口,一旦用户点击文本框就会向用户显示。我正在使用jquery bubblepopup插件,但我似乎无法将其分配给click功能。有2个功能,一个滚动和一个单击我已经分开它们,如果有的话。
$(document).ready(function () {
$('#info-header').CreateBubblePopup({
innerHtml: $('#info-pop').html(),
themeName: 'all-grey',
themePath: '../content/themes/jquerybubblepopup-theme',
position: 'right',
align: 'middle',
tail: 'right',
innerHtmlStyle: {
color: '#FFFFFF',
'text-align': 'left'
}
});
$('#Password').click(function(){
var popup_button = $(this);
popup_button.CreatebubblePopup({
themeName: 'all-grey',
themePath: '../content/themes/jquerybubblepopup-theme',
position: 'top',
align: 'top',
tail: 'bottom',
width: '250px',
innerHtml: '<p>Password Requirements</p><ul><li>Must be at least 6 characters</li> <li>Must include at least 3 of the 4 following items:<ul><li>uppercase letters</li><li>lowercase letters</li><li>numbers</li><li>special characters</li></ul></li></ul>',
innerHtmlStyle: {
color: '#FFFFFF',
'text-align': 'left',
'margin-top': '0'
}
});
popup_button.FreezeBubblePopup();
$('#Password').click(function(){
$(popup_button).HideBubblePopup();
});
});
});
答案 0 :(得分:1)
所以我找到了解决方案,我收到了一封小写字母。然后我从按钮onclick切换到焦点,并使用模糊取消或取消效果。
$(document).ready(function () {
$('#Password').focus(function () {
var popup_button = $(this);
popup_button.CreateBubblePopup({
themeName: 'all-grey',
themePath: '../content/themes/jquerybubblepopup-theme',
position: 'top',
align: 'top',
tail: 'bottom',
width: '250px',
mosueOver: 'hide',
innerHtml: '<p style="font-weight:bold;font-size:13px;">Password Requirements</p><ul style="margin-left:-25px;"><li>Must be at least 6 characters</li> <li>Must have 3 of the following:<ul style="margin-left:-25px;"><li>uppercase letters</li><li>lowercase letters</li><li>numbers</li><li>special characters</li></ul></li></ul>',
innerHtmlStyle: {
color: '#FFFFFF',
'text-align': 'left',
'margin-top': '-10px',
'font-size' : '12px',
'padding' : '0 10px'
}
});
popup_button.ShowBubblePopup();
popup_button.FreezeBubblePopup();
$('#Password').blur(function () {
popup_button.UnfreezeBubblePopup();
popup_button.RemoveBubblePopup();
});
});
});