New: Mixing Ajax and highlight.js
I was testing and had jquery.highlight.js working just fine on a page - also using jquery.forms.js and jquery.validate.js. I then took my testing a step further by separating out the layout to a separate php file.
The Ajax call works fine, in fact everything works fine, EXCEPT my li's no longer highlight. I think it has to do with how I am calling the jquery functions, so I'll start by posting just that part:
-
$(document).ready(function(){
$('form').highlight();
$('#frm').validate({
rules: {
applCode: {
required: true,
maxlength: 1
},
applName: {
required: true,
minlength: 5
},
svDays: {
digits: true,
min: 30
}
},
messages: {
applCode: {
required: 'Please enter an Application Code',
maxlength: 'Application code is a single character'
},
applName: {
required: 'Please enter an Application Name',
maxlength: 'Please use a name with at least 5 characters'
},
svDays: {
digits: 'Only use numbers for hold days',
min: 'Enter a value of 30 or greater'
}
}
});
});
jQuery(function($) {
$('#form_container').load('clientApplProcessingLayout.php', { 'client': '$client', 'appl': '$appl' });
});
$().ajaxSend(function(r,s){
$('#loading').show();
});
$().ajaxStop(function(r,s){
$('#loading').fadeOut('fast');
});
So validate works and the ajax functions work, but the highlight does not work. Any thoughts...need more from me?
Thanks,