javascript - Chrome/Webkit inline-block refresh problem -
The problem I got is the following:
status : I have composite Div is a Then I (thanks for javascript) a Part of the buggy : This works fine on Firefox (it is based in WebKit as the Android browser behaves in the same way). So my question is, is there any such remedy which does not use methods that change the DOM? Edit: As suggested by Duri, I have filled a bug report in WebKit Bugzilla, it is. But I'm still looking for an alternate solution Found my way: Remove all the children from the composite DIV, and then add all to the addition of BR: ; Node.style.display = 'inline'; $ ("#ahah") removal of children ("br") .. SetTimeout (function () {node.style.display = '';}, 0); } inline-block display. Inside there are two elements that have a
inline block also displayed.
& lt; Br / & gt; goes between the two elements on the next line, which is normal behavior.
& lt; Br / & gt; is then deleted (javascript again) and ... the display does not change. It appears that the composite box is not recalculated. In the end, I have two identical markups which are not seen in the same way (which is a bit problematic, not right).
;)
function removeBr () {var ahah = document.getElementById ("ah"); Var children = [], children; While (child = aah.firstChild) {if !! Child.tagName || Child.tagName.toLowerCase ()! == 'br') childs.push (child); Ahah.removeChild (child); } (Var i = 0; i & lt; childs.length; i ++) ahah.appendChild (child [i]); Other types:
function removeBr () {var node = $ ("#hah") [0]
Comments
Post a Comment