How do I combine two plug-ins in the same HTML page? Here is my code:
<script type="text/javascript" src="jquery/jquery-1.4.2.js"> </script>
<script type="text/javascript" src="jquery.innerfade/js/jquery.innerfade.js"> </script>
<script type="text/javascript" src="jquery.validate/jquery-1.4.2.js"></script>
<script type="text/javascript" src="jquery.validate/jquery.validate.js"></script>
<script type="text/javascript">
$(document).ready(
$('#name').focus();
jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
phone_number = phone_number.replace(/\s+/g, "");
return this.optional(element) || phone_number.length > 9 &&
phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, "Please enter a valid phone number.");
$('#quoteForm').validate({
rules: {
phone: {
required: true,
phoneUS: true
}
}// end rules
});// end validate()
function(){
$('ul#slideshow').innerfade({
speed: 1000,
timeout: 5000,
type: 'sequence',
containerheight: '265px'
});
};
}); // end ready()
</script>
I'm trying to use the fade in effect and the validate plugins. They each work independently, but when I combine them, neither one works. Help is greatly appreciated.
EWright.123