Expected identifier

Expected identifier

I have the following script on my page, it works fine on IE 9, 10, but just not on IE 8 nor 7.

It said Expected identifier

  1.  actionSettings = {
             'img': 'trash',
             'text': 'Delete',
             'class': 'delete'
     };

    var btnAction = $('<img />', { 'src': '_Layouts/PastoralCare/icons/' + actionSettings.img + '.png', 'eid': e.ID, 'border': '0', '_text': actionSettings.class, 'student': e.Student, 'studentID': e.StudentID, 'Details': e.Details, 'entryType': e.EntryType, 'category': e.Category, 'class': actionSettings.class, 'alt': actionSettings.text + ' this entry' })
                                          .click(function () {
                                              var text = $(this).attr('_text');
                                              var entryID = $(this).attr('eid');
                                              var student = $(this).attr('student');
                                              var entryType = $(this).attr('entryType');
                                              var category = $(this).attr('category');
                                              var details = $(this).attr('details');
                                              var studentID = $(this).attr('StudentID');
                                              var actionSettings = (text == 'delete') ? { 'text': 'Delete', 'action': 'DELETE', 'class': 'delete' } : { 'text': 'Resore', 'action': 'RESTORE', 'class': 'restore' };

    ................