jQuery on() doesn't work on loaded inputs (datepicker)
Hi!
I have a problem with loaded inputs. The datepicker doesn't show
This is my code:
- $('.datepicker').on('click', function() {
- $(this).datepicker({
- dateFormat: 'yy-mm-dd'
- }).focus();
- });
This code works on the existing input but not on loaded elements.
Any suggestion?
PS: I'm using codeigniter and twitter bootstrap. Usually this code works but i don't know what's the problem here...
Thanks