我想隐藏/显示快捷方式<p:hotkey>
,我成功地将它隐藏在 jQuery 代码中<p:hotkey>
,我怎样才能使用相同的键来显示它?
<script>
jQuery(document).ready(function($) {
$(window).click(function () {
PF('bar').hide();
});
$(window).blur(function () {
PF('bar').hide();
});
});
</script>
html:
<p:notificationBar autoDisplay="true" position="top" effect="slide" widgetVar="bar" style="z-index: 1500;opacity: .98">
<center>
<h:outputText value="Select Bank and press Ctrl , + to add agency" style="color:red;font-size:14px;" /><br/><br/>
<h:outputText value="Click anywhere or press SPACE to hide this bar" style="color:red;font-size:14px;" />
</center>
</p:notificationBar>
<p:hotkey bind="space" onsuccess="PF('bar').hide()"/>