albertopq / jquery_datepicker

Rails 3 plugin that allows you to select dates from a calendar
91 stars 60 forks source link

'jQuery is not defined' when jquery_datepicker HTML output exists in the DOM before jQuery gets loaded. #35

Open kellydunn opened 11 years ago

kellydunn commented 11 years ago

It appears as though jQuery is assumed to be loaded in the DOM before the script tag that gets generated by jquery_datepicker, which results in a 'jQuery is not defined' error upon page load.

Is this by design? Would it be valuable to instead wait for the page to load the entire dom, then execute the javascript necessary to make the desired element a datepicker?

drakmail commented 11 years ago

Yes, it is very uncomfortable.

drakmail commented 11 years ago

@kellydunn, I send pull request ( https://github.com/albertopq/jquery_datepicker/pull/36 ). Fixed version in my repo: https://github.com/drakmail/jquery_datepicker

kellydunn commented 11 years ago

:+1:
:shipit: