I am trying to move all my jquery to an external file however it is not working. I am calling the external file after everything else but the jquery functions are not working. I think it may be because i have more than one function with $(function() { however not being proficient with jquery i do not know how to tackle this. Below is a sample of what i am trying to move over.
<script type="text/javascript">
$(function() {
jQuery("#textsizer a").textresizer({
target: "#size"
});
});
</script>
<script type="text/javascript">
$(function() {
$("#crime").validate();
$.validator.messages.required = '<span style="color:#FE2E2E"> Required</span>';
});
</script>
I am thinking i need to only have one with $(function() { but i don’t know what to correctly replace it with or if this is the reason the external file is not working?
You need to remove the
<script>tags if it is in an external .js file.