I'm with Adrian; that really wasn't a question. But you are correct: jQuery does a very naive translation of display properties when you use anything that show/hides elements (eg. show, hide, togle, fadeOut, etc.).
I've honestly never understood why they do this (it'd be much simpler to simply set display to:
isShown ? '' : 'none';
instead of their logic, which is essentially:
isShown ? 'block' : 'none';
) but they have reasons for just about everything they do, so I imagine they have a some logic behind setting the wrong display types on things.
* EDIT *
As I suspected, the jQuery people did have their reasons (see the comments from jfriend00); also I see that there's an actual question in the question now:
How do I get the fadeIn() to result in display: inline?
The answer is that you need to look at how fadeIn works; essentially it's just:
this.animate({opacity: "show"}, speed, easing, callback );
In other words, it's roughly equivalent to:
this.animate({opacity: '100%'}, speed, easing, function() {
this.css('display', 'block')
});
(WARNING: I'm not actually a big user of jQuery's animation features, so while the above code should work, I make no promises).
Given that, if you want to set the display to something else (like say 'inline'
), you can do:
this.animate({opacity: '100%'}, speed, easing, function() {
this.css('display', 'inline') // or you could use this.css('display', '')
});