【发布时间】:2012-11-13 20:41:56
【问题描述】:
使用来自http://www.davidjrush.com/blog/2011/12/simple-jquery-tooltip/ 的一些简单jQ 逻辑来创建一个简单的工具提示效果。
但是,当我在 JQ 代码中添加换行符时,一切都变南了,逻辑停止工作 (FF)。
作品:
$(this).append('<div class="tooltip"><p>This is a tooltip. It is typically used to explain something to a user without taking up space on the page.</p></div>');
没有:
$(this).append('
<div class="tooltip"><p>This is a tooltip. It is typically used to explain something to a user without taking up space on the page.</p></div>
');
查看 jQ 文档,我找不到任何关于这是一个问题的信息。
任何人都知道它为什么会中断和/或我如何将换行符传递给 jQ.append()
【问题讨论】:
标签: jquery html append line-breaks