I have an issue with my code it seems the .validate
is not working but all the documents are connected and working sweet:
HTML:
<
Your code, as you've posted it, is working as expected... jsFiddle DEMO
Regarding your code...
jQuery(document).ready(function() {
//Home Validation
$("#quote").validate({
rules:{
companyName:{
required: true,
url: true
}
}
});
});
If you've put jQuery into noConflict mode, then your code in noConflict mode is broken.
When using noConflict
mode, you must pass the $
symbol into the document.ready
function. Working demo...
$.noConflict();
jQuery(document).ready(function($) {
$("#quote").validate({
// rules
});
});
OR, you'd use jQuery
in place of $
everywhere. Working demo...
$.noConflict();
jQuery(document).ready(function() {
jQuery("#quote").validate({
// rules
});
});
Otherwise, without using no-conflict mode, it would just look like this. Working demo...
$(document).ready(function() {
$("#quote").validate({
// rules
});
});