Hi,
the jquery function show() is at the moment making objects visible by
running
elm.style.display = 'block';
This works just fine for all block elements (div, etc.) but causes some
problems when running on inline elements like links or other elements like
table-cells.
I think it'd be better to do this:
elm.style.display = get_type(elm);
function get_type(elm) {
obj = document.createElement(elm.tagName);
$('body').append(obj);
type = $.curCSS(obj, 'display');
$(obj).remove();
return type;
}
This works for divs as well as for cells.
Benjamin Wiegand
--
View this message in context:
http://www.nabble.com/%24.show%28%29-improvement-tf3228045.html#a8967697
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/