How to solve jQuery conflict between Prototype and DataPicker or Tooltip?

前端 未结 1 984
伪装坚强ぢ
伪装坚强ぢ 2021-01-27 08:44

I have a problem with my backend aplication. I have data field in my form, for which I am using plugin jQuery DataPicker. At first it works fine - when I click on the field cal

相关标签:
1条回答
  • In the datpicker javascript file at line 510

    this._trigger('hide');
    

    Inside this method it is attempting to fire a jQuery event, because of the way that jQuery handles events and custom events it will look at the methods defined on the DOM object, and then go to native events and then custom events (I think) so it is finding the Element#hide() method that sets the style to display:none

    so 2 solutions

    1. comment that line out
    2. if you are using the hide event, rename the event to a different name. I like namespacing the event, eg datepicker:hide
    0 讨论(0)
提交回复
热议问题