I am developing a script that uses jQuery's val() and attr() but they seems not equal. They are both have the same text and length. When I compare both using IF statement they return false
var isSame = $(this).val() == $(this).attr("placeholder");
console.log('$(this).val() == $(this).attr("placeholder"): ' + isSame);
Looking on jQuery's API documentation on val() and attr() they both return String that is so I tried adding .toString() on both values but they doesn't work either.
Here is the screenshot using IE developer tools, emulated IE7
Some of us are still using old browsers such as IE7 so I need to use and test it on IE7