Javascript 将figcaption移到锚内

Javascript 将figcaption移到锚内,javascript,jquery,Javascript,Jquery,我需要修改DOM以在a元素内移动figcaption。我正在尝试这样的东西,但不起作用: $('.wp caption text.gallery caption')。insertAfter('img.attachment full')它在Chrome/Mac上运行良好!=>它在Chrome/Mac上运行良好!=>

我需要修改DOM以在a元素内移动figcaption。我正在尝试这样的东西,但不起作用:


$('.wp caption text.gallery caption')。insertAfter('img.attachment full')它在Chrome/Mac上运行良好!=>它在Chrome/Mac上运行良好!=>