JQuery Timepicker not working (doesn't have curCSS method)

My head hurts a day later due to this error.

The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method 'curCSS' 

my html:

 <input class="field2" type="text" name="time" placeholder="Time" value ="<?php echo $this- >input->post('time'); ?>" id = "timepicker"/></div> 

im currently uses a code igniter, and im also uses a date picker. I think the conflict is included in js libraries, but still I cannot debug it.

EDIT: These are included js

 <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> <script type="text/javascript" src="<?php echo base_url() ?>js_front/jquery-1.8.3.js"></script> <script type="text/javascript" src="<?php echo base_url() ?>js_front/ui/jquery.ui.core.js"></script> <script type="text/javascript" src="<?php echo base_url() ?>js_front/ui/jquery.ui.widget.js"></script> <script type="text/javascript" src="<?php echo base_url() ?>js_front/ui/jquery.ui.datepicker.js"></script> 

and here timepicker is assigned to an input tag of type text

 $(function() { $( "#timepicker" ).timepicker(); 

});

+8
jquery codeigniter timepicker
source share
3 answers

What version of jQuery are you using? curCSS is deprecated and removed in 1.8. Either use an older version of jQuery, or replace "curCSS" with "css" in your timepicker code.

http://bugs.jquery.com/ticket/11921

+17
source share

One thing that should help you narrow it down is removing the redundant / potentially conflicting script links. Your code includes a link to two different versions of jQuery and two different versions of jQuery UI - this may not be a good start.

After uploading files hosted by Google, upload more scripts if they include plugins that are no longer part of the main jQuery UI.

+2
source share

replaced $ .curCSS (removed from jQuery 1.8+) with $ .css

+1
source share

All Articles