Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 将p:工具提示附加到没有Id的元素_Jquery_Primefaces_Xhtml_Tooltip_Legend - Fatal编程技术网

Jquery 将p:工具提示附加到没有Id的元素

Jquery 将p:工具提示附加到没有Id的元素,jquery,primefaces,xhtml,tooltip,legend,Jquery,Primefaces,Xhtml,Tooltip,Legend,我想知道是否有一种方法可以将PrimeFaces工具提示附加到只有类和一些文本的元素上。我正在尝试将一些工具提示附加到图例标签 我尝试使用jQuery选择器来选择特定元素,但这似乎不起作用。从尝试下面的脚本时,将选中除标签以外的所有内容 <script> var elementCount = $( "*" ).css( "border", "3px solid red" ).length; $( "body" ).prepend( "<h3>" + element

我想知道是否有一种方法可以将PrimeFaces工具提示附加到只有
类和一些文本的
元素上。我正在尝试将一些工具提示附加到图例标签

我尝试使用
jQuery
选择器来选择特定元素,但这似乎不起作用。从尝试下面的脚本时,将选中除标签以外的所有内容

<script>
  var elementCount = $( "*" ).css( "border", "3px solid red" ).length;
  $( "body" ).prepend( "<h3>" + elementCount + " elements found</h3>" );
</script>

var elementCount=$(“*”).css(“边框”,“3px实心红色”).length;
$(“body”).prepend(“+elementCount+”找到的元素”);

将代码附加到问题检查文档,检查PF选择器和检查PrimeFaces extensions工具提示我尝试使用选择器执行此操作,但似乎不起作用。之后,我在jQuery文档中使用了一个示例脚本。这会选择所有元素,但不会选择图例。