您的位置:首页 > Web前端 > JQuery

how to use jquery with primefaces

2013-11-18 14:44 525 查看
PrimeFaces already ships with jQuery bundled, yet you've downloaded and installed another one which would only conflict with PrimeFaces bundled jQuery. I'm sure that if you have paid a bit more attention and love to the webbrowser's builtin JavaScript console, you would have seen JS errors.

You need to remove the following line:

<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>


On pages which do not necessarily use PrimeFaces components, jQuery won't be automatically included, you'd then need to explicitly load its bundled jQuery by a proper
<h:outputScript>
.

<h:outputScript library="primefaces" name="jquery/jquery.js" />


Note that using
<h:outputScript>
does not end up in a duplicate script include on pages which actually use PrimeFaces components.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: