olivernn / davis.js

RESTful degradable JavaScript routing using pushState
http://davisjs.com
532 stars 58 forks source link

Compatibility with jquery validation #47

Closed iainxt closed 12 years ago

iainxt commented 12 years ago

When I include jquery.validation (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) I find that davis.js no longer works. The routing code is not hit. No errors are raised.

I realize this is probably not an issue with davis.js, but I'm unsure how to resolve this. Any ideas?

olivernn commented 12 years ago

So the application still starts, but routes are not being run? What routes are not being run, ones which should be triggered from a form submission?

I don't have any expirience with that plugin, but maybe there is some validation error on a form which is preventing the form from being submitted, this will mean that the route will never be run.

If you could put together a really simple test case showing the problem it would be really useful, then I can investigate what is going on.

iainxt commented 12 years ago

Hey thanks for the reply. Yep the application starts. I've since done some more debugging and I have found that if I dynamically add the validation js file after page load event it works. That works for me :) Thanks for the library.

iainxt commented 12 years ago

Closing because I have a work around

olivernn commented 12 years ago

I'm glad that you've got it working, is loading the validation.js file after the page loads your workaround?

I'd still be interested in getting to the bottom of why this happened, so if you do have a reproducible test case to share that would be massively useful.

iainxt commented 12 years ago

I'll put together a test case over the weekend.