0

在表单中有一个输入

input(rel='popover', data-content='Precio del Alquiler.',type="text",placeholder="Precio del Alquiler",id="precio",name='precio_alquiler')

当我使用 jQuery 调用 popover 引导程序时,一切正常。

$('#precio').popover('show);

但是我不得不纠正设计中的一个问题,我改变了输入的结构,如下所示:

div.input-prepend
    span.add-on $
    input.prependedInput(rel='popover', data-content='Precio del Alquiler.',type="text",placeholder="Precio del Alquiler",id="precio",name='precio_alquiler')

当我调用 jQuery 函数时,弹出框显示为空。这是为什么?

4

1 回答 1

0

解决方案很简单......只需在父 div 中执行 popover

div.input-prepend(rel='popover', data-content='Precio del Alquiler.')
    span.add-on $
    input.prependedInput(type="text",placeholder="Precio del Alquiler",id="precio",name='precio_alquiler')

jquery代码是

$('#precio').parent().popover('show);

全部

于 2013-02-03T23:38:31.563 回答