jQuery after show() assumes that display:inline is :hidden. Why?
- by Janis Veinbergs
With jQuery 1.4.2, :hidden filter is not filtering out elements that were hidden, but i've made then visible by calling show(). Filter assumes it is still hidden.
Is this bug or am i missing something? Consider the following code:
$("td.ms-authoringcontrols > span[id*='_ParallelApprovers']:hidden:first").css("display")
"none"
$("td.ms-authoringcontrols > span[id*='_ParallelApprovers']:hidden:first").show()
Object
$("td.ms-authoringcontrols > span[id*='_ParallelApprovers']:hidden:first").css("display")
"inline" // ?? Let me scratch my head...
$("td.ms-authoringcontrols > span[id*='_ParallelApprovers']:hidden:first").is(":hidden")
true //element with "display:inline", visible in browser, but yet it is hidden
Instead of "inline", you would expect "none", because :hidden filter was used.
What it does is from an array of objects it selects first hidden element. Each time i call these lines of code, i expect them to select next hidden element (not the one i just showed).