0👍
On line $("#modal").on('shown.bs.modal', function() { ... });
, there is no matching element in the HTML with id="modal"
try changing $("#modal").on('shown.bs.modal', ...
to $("#viewPollingModal").on('shown.bs.modal'...
Source:stackexchange.com