문제

I'm experiencing issues with twitter's bootstrap-modal javascript.

I'm just using the same code they have on their page

<!-- sample modal content -->
<div id="modal-from-dom" class="modal hide fade">
    <div class="modal-header">
        <a href="#" class="close">&times;</a>
        <h3>Modal Heading</h3>
    </div>
    <div class="modal-body">
        <p>One fine body…</p>
    </div>
    <div class="modal-footer">
        <a href="#" class="btn primary">Primary</a>
        <a href="#" class="btn secondary">Secondary</a>
    </div>
</div>

and then

<button data-controls-modal="modal-from-dom" data-backdrop="true" 
    data-keyboard="true" class="btn primary">Launch</button>

Of course, when I click on my Launch button nothing happens. Am I supposed to add something to a script.js file?

In my header I am loading jquery, bootstrap and a bunch of other stuff. Should my code work, or is there anything I didn't do correctly?

thx for any answer

도움이 되었습니까?

해결책

Are you initializing it like this?

$('#modal-from-dom').modal(options)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top