开发者

jQuery fadeIn function just appearing without fadeIn

I have a function that should produce a fadeIn, but it isn't. I am not sure if the parameters are correct and would appreciate some advice on where I have incorrectly coded. The code that is using the fadeIn, is this $('#fb_message').fadeIn('slow', function() {.

Is it something to do with the reset above it?

Many thanks.

$('#fb_submit').click(function () {

        var name = $('#fb_uname').val();
        var client = $('#fb_client').val();
        var department = $('#fb_department').val();
        var email = $('#fb_email').val();
        var position = $('#fb_position').val();
        var feedback = $('#fb_feedbacknew').val();
        var data = 'fb_uname=' + name +
                   '&fb_client=' + client +
                   '&fb_department=' + department +
                   '&fb_email=' + email +
                   '&fb_position=' + position +
     开发者_Python百科              '&fb_feedbacknew=' + feedback;
        $.ajax({
            type: "POST",
            url: "feedback.php",
            data: data,
            success: function (data) {
                $("#feedback").get(0).reset();
                $('#fb_message').fadeIn('slow', function() {

                    $('#fb_message').html(data);
                    });

                //$("#form").dialog('close');
                $("#flex1").flexReload();

            }
        });
        return false;

    });


is your code in ????

$(document).ready(function){


});

try

<script language="javascript" type="text/javascript"> 

    $(document).ready(function){

           $('#fb_message').hide(); 
    });
</script>

UPDATE

try this also in your success function

  success: function (data) {
        $("#feedback").get(0).reset();

        $('#fb_message').hide().html(data).fadeIn('slow');

        //$("#form").dialog('close');
        $("#flex1").flexReload();

    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜