Initially I posted this question. But subsequently I've got the answer by trial and error. Now I'd like to know the reason why my answer will work.
In the saved page below when I run $("#debitCard").change();
from extension it does not work but when I run from Chrome Console it works?
Why this behavior could be different from when run from Console? I've even run it within setTimeout
I've even created a button in the HTML upon clicking which it will call this function but even that isn't working. However calling from the Console is working every time.
Answer
I replaced this $("#debitCard").change();
to this:
var element = document.getElementById('debitCard');
var event = new Event('change');
element.dispatchEvent(event);
I want to know the reason of this quirk of Javascript/JQuery