jQuery 将图像附加到 div 不显示,但可以在 Firebug 上看到它
我有这个设计应用程序,它允许用户使用 jQuery 在 div 上动态添加文本(追加)。文本是使用 ImageMagick 生成的(因此它有一些效果,如曲线、波浪等。)并且它是 png 格式。
我的问题是,每当我尝试处理图像并将其 jQuery“有时”附加到 html div 时,它都不会显示,但是当使用 firebug 检查时,我可以看到元素/图像就在那里。我猜这是关于生成图像时互联网连接的“延迟”。
有没有办法“预加载”或确保在将图像附加到 div 之前创建图像?
该图像是通过 jQuery 使用“shell_exec(“imagemagick command”)”发布到“php”文件创建的,并且我已经在发布完成时添加了一个回调(追加发生在此处)。
谢谢 (”,)
I have this design application which allows users to dynamically add text(append) on a div using jQuery. The text is generated using ImageMagick(so it has some effects like curve,wave, etc..) and it is in png format.
My problem is that whenever I try to process the image and jQuery-append it to the html div "sometimes" it wont show up, but when checking with firebug I can see that the element/image is there. I'm guessing this is about "delay" in internet connection while generating image.
Is there a way to "preload" or make sure that the image is created before it is appended to the div ?
The image is created via jQuery post to a "php" file with "shell_exec("imagemagick command")" and I've already added a callback when the post is finished(the append happens here).
Thanks (",)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)