I created a Plunker based off the Dialog sample code and it would not execute the PrimeElement code. Here is the example I created (Version 3: https://plnkr.co/edit/WMawVdtcvDpmVxzI4b3Q?p=preview )
index.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/primeui/4.1.15/primeui.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.js"></script>
<script type="text/javascript" src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/primeui/4.1.15/primeui.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/x-tag/1.5.11/x-tag-core.min.js"></script>
<script type="text/javascript" src="primeelements.js"></script>
</head>
<body>
<button id="btn-show" type="button" onclick="document.getElementById('dlgelement').show()" is="p-button" icon="fa-external-link-square">PrimeElement</button>
<p-dialog id="dlgelement" title="Title of Dialog" modal>
content here
<script type="x-facet-buttons">
<button type="button" is="p-button" icon="fa-check" onclick="document.getElementById('dlgelement').hide()">Yes</button>
<button type="button" is="p-button" icon="fa-close" onclick="document.getElementById('dlgelement').hide()">No</button>
</script>
</p-dialog>
</body>
</html>
This is based off the Quick Start and Dialog example.
I was only able to get it to work after I added jQuery initialization.
<script>
$(function(){
$('#dlgelement').puidialog();
$('#btn-show').click(function(){
$('#dlgelement').show();
});
});
</script>
Working here: (Version 5) https://plnkr.co/edit/WMawVdtcvDpmVxzI4b3Q?p=preview
It may be a bug in the PrimeUI. You can for the Plunker and test your own code.
Update
As I tinker with this more, since I have not used PrimeUI before, I updated my Plunker to match their example code. When I go to close a dialog is when I encounter the error you described.
TypeError: t(...).zIndex is not a function
...nd(this.blockEvents,function(i){return t(i.target).zIndex()<e.element.zIndex()?!...
primeui.min.js (line 3, col 9489)
I switched to the non-minimized version and got:
TypeError: $(...).zIndex is not a function
if ($(event.target).zIndex() < $this.element.zIndex()) {
primeui.js (line 4116, col 29)
.zIndex() is an element of jQuery UI and should have already loaded. This error suggests that something in PrimeUI is not using it right or disabling it.