Saw this syntax in a code example:
<script>
$(function () {
function fun1(event) {
...
}
function fun2(event) {
...
}
});
</script>
Question is what the $(function () {...}) wrapper does here? what's this syntax different from
<script>
function fun1(event) {
...
}
function fun2(event) {
...
}
</script>
Thanks