This is my first try at javascript, but I can't get my external .js file to work. *I have included the .js file and jquery src in my <head> *I am calling this function right above my closing </body> tag <script type="text/javascript"> ads(); </script> External File: $(function (ads) { }); When I put the actual function on the html page it works, when I try to call the function from the external file it does not. How do I correctly call this function? Thanks
try changing the $(function (ads) { to function ads() { Besides - since you're not showing us the file, are you sure you've included the files correctly? Like the jQuery-file before the external .js-file, and that the external .js-file is included correctly?
Thanks you, there was a mistake on my end. I was using a Dreamweaver template and needed the include line to say <script src="../javascript-fixed-ads.js"></script> instead I had it as <script src="/javascript-fixed-ads.js"></script> It worked with the $ there and didn't without. Thanks for your time