I am having issues with the .click function working for a
tag within a jQuery dialog.
I have a a p tag that looks like below, inside a jQuery dialog.
<p class="userColor" id="CMP|8|25691/XX|25691/59|59" style="text-decoration:underline;cursor:pointer;">59 - GRAPE</p>
div
<div id="colorPickerWindow" style="width: auto; min-height: 89px; max-height: none; height: auto;" class="ui-dialog-content ui-widget-content">
<p class="userColor" id="CMP|8|25691/XX|25691/20|20" style="text-decoration:underline;cursor:pointer;">20 - RED</p>
</div>
I have tried .click and .on and I have tried both using a selector, but I cannot get the a click action to fire for the P tag.
jQuery
$(".userColor").on({
click:function(){}
});
What is the correct jQuery to get a click event to fire within a jQuery dialog?