Frank Vèssia Posted February 14, 2011 Share Posted February 14, 2011 For using jQuery validation i need to instance first the js files in my template from /wire/modules/jquery... or there is some automatic procedure? Link to comment Share on other sites More sharing options...
Adam Kiss Posted February 14, 2011 Share Posted February 14, 2011 Do you mean in administration (modules) or front-end? If it's administration (modules), then wait for Ryan, if it's front-end, then use your own copy of jQuery. Or if it's general question like 'should I use jQuery form validation before or after including jQuery'... well, that one's obvious. Link to comment Share on other sites More sharing options...
Frank Vèssia Posted February 14, 2011 Author Share Posted February 14, 2011 I mean in front end. I use the same of PW jQuery Validate and there is a copy in admin so i think it's a waste to reinstance another copy for front end but at the same time it's not clean call files from the admin directory... Link to comment Share on other sites More sharing options...
Adam Kiss Posted February 14, 2011 Share Posted February 14, 2011 If by 'reinstance' you mean calling jQuery twice, then don't worry, because you're calling it just once, only different versions. If by 'reinstance' you mean to keep two different versions of jQuery, then don't worry – you should keep front-end as fast and modern as possible and core&admin as stable as possible, so... just keep two different versions. Or use google CDN version with local admin fallback. Link to comment Share on other sites More sharing options...
ryan Posted February 15, 2011 Share Posted February 15, 2011 I agree with Adam on this that it is okay to use a different jQuery on admin and front-end. If the jQuery used on the admin is the version you want, then there is certainly no harm in linking to it and using it. But I wouldn't want you to run into a situation where you upgrade ProcessWire (which likewise installed a newer jQuery core) and for some reason it wasn't compatible with your site's jQuery code or jQuery plugins. The safest thing to do is to keep your own separate copy of jQuery in /site/templates/scripts/ (or wherever you place your JS files). It good insurance given that your web site and the ProcessWire admin are two completely separate applications with potentially different needs. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now