I do not understand why when I search for PALAVRA
inArray()
jQuery does not find it. But if I look for palavra
gives positive, when in array it is PALAVRA
.
The first test I expected positive does not work, why? In the manual says that the comparison of values is strict, what does it mean in this case?
var titles = ['{EXTENSIONS}', '{dummy}'];
var title1 = "{EXTENSIONS}";
if( $.inArray( title1, titles ) ) {
$('#txt1').text('No!'); // Não entra
}
var title2 = "{extensions}";
if( $.inArray( title2, titles ) ) {
$('#txt2').text('Yes!'); // Entra
}
var title3 = "{dummy}";
if( $.inArray( title3, titles ) ) {
$('#txt3').text('Yes!');
}