JavaScript/jQuery wierdness

I was editing some code a few days ago, and I added another function within the scope of $(function{}); and I called it within my JavaScript code, and it kept giving me reference errors. After a few minutes I got frustrated and tried to make a simple HTML code call the JavaScript function and nothing. Same error!

I decided to get the new function out of the $(function {} ); area and place it right above it, and wouldn’t you know. It worked.

Does Not Work

When linkClick value is added to the HTML and clicked, I get a reference error.