简体   繁体   中英

Timepicker jquery not working (has no method curCSS)

My head is aching for already a day because of 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 is:

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

im currently using code igniter and im also using the date picker. i think there's a conflict on the included js libraries, but still, I can't debug it.

EDIT: These are the 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 is the assigning of the timepicker into an input tag type text

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

});

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

One thing that should help you narrow it down is removing redundant/potentially conflicting script references. Your code includes a reference for two different version of jQuery and two different version of jQuery UI - that can't be a good start.

After you load the google hosted files, only load more scripts if they include plugins not already a part of the core jquery UI.

用$ .css替换$ .curCSS(从jQuery 1.8+中删除)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM