Jquery隐藏不';我不能长时间工作

Jquery隐藏不';我不能长时间工作,jquery,hide,Jquery,Hide,我在svg元素上使用jquery的隐藏功能,除非我尝试指定一个持续时间,否则效果很好: // Hide the object: works fine $('#id').hide() // Doesn't work with time specified in any of these attempts including fadeout $('#id').hide('slow') $('#id').hide(400) $('#id').hide(400, function() {console

我在svg元素上使用jquery的隐藏功能,除非我尝试指定一个持续时间,否则效果很好:

// Hide the object: works fine
$('#id').hide()

// Doesn't work with time specified in any of these attempts including fadeout
$('#id').hide('slow')
$('#id').hide(400)
$('#id').hide(400, function() {console.log('done')})
$('#id').fadeOut()
$('#id').fadeOut(400)
编辑:这是控制台显示的内容:

// Works
$('#HTI2010').hide()
[
<circle cx=​"50" cy=​"450" id=​"HTI2010" r=​"10" class=​"c2010" title style=​"display:​ none;​ ">​</circle>​
]

// Doesn't work: display is set to in-line instead of none:  is there an argument I can alter to change this?

$('#HTI2010').hide(400)
[
<circle cx=​"50" cy=​"450" id=​"HTI2010" r=​"10" class=​"c2010" title style=​"display:​ inline;​ ">​</circle>​
]
//有效
$('#HTI2010').hide()
[
​​
]
//不起作用:display设置为in-line而不是none:是否有参数可以更改?
$('HTI2010').hide(400)
[
​​
]
该对象将保留在屏幕上以进行这些操作。我错过什么了吗?谢谢,

试试这个:

var duration = 400;

$('#id').hide(duration);

你的浏览器上一定有一些特定的错误。你能在JSFIDLE上发布代码吗?在这里工作(虽然很难看)。谢谢你在JSFIDLE上显示——也许我的编辑也会帮助我解释问题工作,所有选项。感谢@j08691的帮助,这样我就可以让SVG元素正常工作了。迈克,你在用什么浏览器?