SORU
1 Kasım 2012, PERŞEMBE


Nasıl Bootstrap kalıcı bir pencere jQuery kullanarak açılır?

Twitter Bootstrap kalıcı pencere işlevi kullanıyorum. Birisi benim formu tıkladığında, üzerine tıklayarak kalıcı pencere göstermek istiyorum "şeklinde. gönder butonuna

<form id="myform" class="form-wizard">
    <h2 class="form-wizard-heading">BootStap Wizzard Form</h2>
    <input type="text" value=""/>
    <input type="submit"/>
</form>

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">Modal header</h3>
    </div>
    <div class="modal-body">
        <p>One fine body…</p>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
        <button class="btn btn-primary">Save changes</button>
    </div>
</div>

bir WordPress kullanmak:

$('#myform').on('submit', function(ev) {
    $('#my-modal').modal({
        show: 'false'
    }); 


    var data = $(this).serializeObject();
    json_data = JSON.stringify(data);
    $("#results").text(json_data); 
    $(".modal-body").text(json_data); 

    // $("#results").text(data);

    ev.preventDefault();
});

CEVAP
1 Kasım 2012, PERŞEMBE


Bootstrap el modellerimiz üzerinde adlı bir kaç işlevi vardır:

$('#myModal').modal('toggle');
$('#myModal').modal('show');
$('#myModal').modal('hide');

Daha fazla burada görebilirsiniz: Bootstrap modal component

Özellikle methods section.

Değiştirmek için ihtiyacınız olacak:

$('#my-modal').modal({
    show: 'false'
}); 

için:

$('#myModal').modal('show'); 

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

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • HER0R

    HER0R

    16 Aralık 2007
  • My Name Is Jeff

    My Name Is J

    26 ŞUBAT 2008
  • Sarah's YouTube Channel

    Sarah's YouT

    27 Temmuz 2009