How to prevent ajax success showing before image broken icon?

Before success showing image broken icon. How to prevent it or have a better solution –
Here is my code

var menuName = ['about.jpg', 'concerns.jpg', 'contact.jpg', 'gallery.jpg'];
                    $.ajax({
                        url: htmlContetPage[menuItem],
                        success: function (data) {
                            $('.content_area').html(data);
                            $("img").error(function(){
                                $(this).hide();
                            });
                            $('.wheelSelect').html('<img style="width:100%;overflow:hidden;" src="images/' + menuName[menuItem] + '" />');
                        },
                        dataType: 'html'
                    })


Source: css3

Leave a Reply