0

i just tzCheckbox as fancy ON/OFF and under IE8 i have error in this line

// Creating the new checkbox markup:
var checkBox = $('<span>', {
    class: 'tzCheckBox ' + (this.checked ? 'checked' : ''),
    html: '<span class="tzCBContent">' + labels[this.checked ? 0 : 1] +
          '</span><span class="tzCBPart"></span>'
});

and error says: expected identifier, string or number.

Roko C. Buljan
  • 180,066
  • 36
  • 283
  • 292
kosnkov
  • 5,131
  • 11
  • 60
  • 97

1 Answers1

1

I had same problem under ie8 but, now I solved. You need to change class part like below.

'class' : 'tzCheckBox'+(this.checked?' checked':''),

refer this Possible cases for Javascript error: "Expected identifier, string or number" One of these answers was helpful.

Community
  • 1
  • 1
riche
  • 11
  • 1