Czech out the return value in jQuery

Czech out the return value in jQuery

I'll check the value returned by the function if it was one thing and do another task, but it does not work otherwise?
  1. $.post('ajaxs.php', {
  2. name: name_,
  3. mail: mail_,
  4. matn: matn_,
  5. url: url_,
  6. id: id_
  7. }, function (data) {
  8. $('#readmore').html(data);
  9. if(data == 1) {
  10. $('#readmore').css({
  11. "border-color": "#00CC00",
  12. "border-width": "1px",
  13. "border-style": "solid"
  14. });
  15. } else {
  16. $('#readmore').css({
  17. "border-color": "#ff0000",
  18. "border-width": "1px",
  19. "border-style": "solid"
  20. });
  21. }
  22. });