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?
- $.post('ajaxs.php', {
- name: name_,
- mail: mail_,
- matn: matn_,
- url: url_,
- id: id_
- }, function (data) {
- $('#readmore').html(data);
- if(data == 1) {
- $('#readmore').css({
- "border-color": "#00CC00",
- "border-width": "1px",
- "border-style": "solid"
- });
- } else {
- $('#readmore').css({
- "border-color": "#ff0000",
- "border-width": "1px",
- "border-style": "solid"
- });
- }
- });