SORU
2 Kasım 2012, Cuma


HTML Twitter Bootstrap popover içinde

Bir bootstrap popover, ama bir şekilde onun değil çalışma içinde html görüntülemek için çalışıyorum. Ama benim için işe yaramaz bazı cevaplar buldum. Bana eğer yanlış bir şey yapıyorsam lütfen bize bildirin.

<script>
  $(function(){
    $('[rel=popover]').popover({ 
      html : true, 
      content: function() {
        return $('#popover_content_wrapper').html();
      }
    });
  });
</script>

<li href="#" id="example" rel="popover" data-content="" data-original-title="A Title"> 
  popover
</li>

<div id="popover_content_wrapper" style="display: none">
  <div>This is your div content</div>
</div>

Çok teşekkür ederim.

CEVAP
2 Mayıs 2013, PERŞEMBE


öznitelik data-html="true" kullanabilirsiniz:

<a href="#" id="example"  rel="popover" 
    data-content="<div>This <b>is</b> your div content</div>" 
    data-html="true" data-original-title="A Title">popover</a>

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • BruBearBaby

    BruBearBaby

    25 Ocak 2011
  • Māris Zaharovs

    Māris Zahar

    28 Mayıs 2008
  • Mindy

    Mindy

    20 NİSAN 2006