Javascript XPages中的Jquery工作不正常

Javascript XPages中的Jquery工作不正常,javascript,jquery,xpages,lotus-notes,lotus-domino,Javascript,Jquery,Xpages,Lotus Notes,Lotus Domino,我有一个xpage,并在其中添加了jquery作为脚本资源。然后我添加了一些控件(编辑、计算、带有jquery函数的输出脚本),我正在尝试一些虚拟的东西。请看下面我的xpage: <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.resources> <xp:script src="htt

我有一个xpage,并在其中添加了jquery作为脚本资源。然后我添加了一些控件(编辑、计算、带有jquery函数的输出脚本),我正在尝试一些虚拟的东西。请看下面我的xpage:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
    <xp:this.resources>
        <xp:script src="http://code.jquery.com/jquery-1.10.2.js"
            clientSide="true">
        </xp:script>
        <xp:script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"
            clientSide="true">
        </xp:script>
        <xp:styleSheet
            href="http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
        </xp:styleSheet>
    </xp:this.resources>

    <xp:scriptBlock id="scriptBlock1">
        <xp:this.value><![CDATA[$(document).ready(function() {
  $("#{id:button1}").mouseover(function() {
      alert('sdfsdfsdf');
  });
});]]></xp:this.value>
    </xp:scriptBlock>
    <xp:br></xp:br>
    <xp:br></xp:br>    
    <xp:button value="Label" id="button1"></xp:button>
    <xp:br></xp:br>
    <xp:br></xp:br>
    <xp:text escape="false" id="ttt">
        <xp:this.value><![CDATA[#{javascript:"<p id='test'>sdfsdfsdf</p>"}]]></xp:this.value>
    </xp:text>
</xp:view>

当我悬停按钮时,什么也没发生。如果我将鼠标指针的id设置为#test,那么它就会工作

在XPages中使用jquery有什么问题?

使用openntf中的代码片段或使用

$("[id$='#{id:button1}']").mouseover(function() {...

还考虑使用类选择器而不是ID选择器。为了避免产生奇怪的ID,我总是使用类选择器。