jQuery(document).ready(function ($) {
alert('ole');
$("#upd-role").change(function () {
var this2 = this;
$.post(
my_ajax_obj.ajax_url,
{
_ajax_nonce: my_ajax_obj.nonce,
action: "ajax_handler_hook",
role: this2.value
}, function (data) {
console.log(data);
});
});
});
Changed the code to the above, i cannot even get the alert on document load.