CodeIgniter Forums
CI and jQuery - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CI and jQuery (/showthread.php?tid=9152)



CI and jQuery - El Forum - 06-14-2008

[eluser]MgM Web[/eluser]
I know there are a lot of posts around this forum that explains how to use jQuery with CI. But I have not got this to work.

I am trying to implement jQuery DatePicker. This is working perfectly on non-ci sites but inside CI I can not get this to work.

This is my code inside my view:

Code:
$('#txtDateFrom').datepicker();


<input type="text" id="txtDateFrom" />;

Do I have to do any hack anywhere else?


CI and jQuery - El Forum - 06-14-2008

[eluser]Rick Jolly[/eluser]
Try this?
Code:
$(document).ready(function() {
    $('#txtDateFrom').attachDatepicker();
});



CI and jQuery - El Forum - 06-14-2008

[eluser]MgM Web[/eluser]
Code:
$(document).ready(function() {
    $('#txtDateFrom').datepicker();
});

Yes, that one worked.. Strange I thought I tried that as well.
But thank you anyway!