Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Baffled by } jquery error

so I keep getting the error:

employeesScript.js:3Uncaught SyntaxError: Unexpected token {.

It is driving me nuts because I can't figure out what is causing it. I also ran it through JSFiddle and got the following error:

Error:
Problem at line 3 character 50: Expected ')' and instead saw '{'.
$(".employeesPostHours").live("click", fuction() {

Problem at line 3 character 51: Missing semicolon.
$(".employeesPostHours").live("click", fuction() {

Problem at line 45 character 1: Expected '(end)' and instead saw '}'.
});

Implied global: $ 1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20, fuction 3, employeeEntry 5,6,7,8,9,10,11,12,13, employeesId 6,23, employeesEmail 7,24, employeesStartTime 8,25, employeesEndTime 9,26, employeesDate 10,27, employeesExtraMoney 11,28, employeesExtraMoneyDetail 12,29, driving 13,30, onTruck 14,31, warehouse 15,32, phones 16,33, flyering 17,34, wageChange 18,35, alert 38

Here is my Jquery:

$(document).ready(function(){

$(".employeesPostHours").live("click", fuction() {
$("#employeesSection1Form").append("Please Wait...");
employeeEntry = $(this).closest("div");
employeesId = $(employeeEntry).find("#employeesId").val();
employeesEmail = $(employeeEntry).find("#employeesEmail").val();
employeesStartTime = $(employeeEntry).find("#employeesStartTime").val();
employeesEndTime = $(employeeEntry).find("#employeesEndTime").val();
employeesDate = $(employeeEntry).find("#employeesDate").val();
employeesExtraMoney = $(employeeEntry).find("#employeesExtraMoney").val();
employeesExtraMoneyDetail = $(employeeEntry).find("#employeesExtraMoneyDetail").val();
driving = $(employeeEntry).find("#driving").val();
onTruck = $(onTruck).find("#onTruck").val();
warehouse = $(warehouse).find("#warehouse").val();
phones = $(phones).find("#phones").val();
flyering = $(flyering).find("#flyering").val();
wageChange = $(wageChange).find("#wageChange").val();

$.post(
            'employeesHoursPost.php', 
            {
                'employeesId': employeesId,
                'employeesEmail': employeesEmail,
                'employeesStartTime': employeesStartTime,
                'employeesEndTime': employeesEndTime,
                'employeesDate': employeesDate,
                'employeesExtraMoney': employeesExtraMoney,
                'employeesExtraMoneyDetail': employeesExtraMoneyDetail,
                'driving': driving,
                'onTruck': onTruck,
                'warehouse': warehouse,
                'phones': phones,
                'flyering': flyering,
                'wageChange': wageChange
            },
            function (response) {
            alert (response);
            }
);
return false;
});

});
like image 413
radleybobins Avatar asked Dec 20 '22 22:12

radleybobins


1 Answers

fuction is misspelled. It should be function on line 3.

like image 130
dtbarne Avatar answered Jan 30 '23 18:01

dtbarne