Put your js code in function and call it in oncomplete your p:ajax
Like this
<p:ajax update="outPan" event="change" oncomplete="myFunc()" />
js code:
<script type="text/javascript"> $(document).ready(function(){ myFunc(); }); function myFunc() { $('#sButton').prop('disabled',true); $('#wType').css({'border':'red'}) } </script>
Explanation:
There is no ready event after ajax arithmetic (in the end it is ajax, not a full page reload)
If you want to include some js code after p:ajax , you can use its onsuccess attribute
source share