• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI and jQuery

#1
[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?

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

#3
[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!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.