मेरे एप्लिकेशन में मैं AJAX के बाद मैन्युअल रूप से बूटस्ट्रैप मोडल दृश्य को बंद करना चाहता हूं अनुरोध समाप्त हो गया है। मैं कॉलबैक भीतर jQuery('#myModal').modal('hide');
फोन,jQuery बूटस्ट्रैप: "टाइप एरर: 'अपरिभाषित' एक फ़ंक्शन नहीं है ('jQuery (' # myModal ') का मूल्यांकन करना। मॉडल (' छुपाएं ')'
function(){
jQuery('#myModal').modal('hide');
}
लेकिन मोडल दृश्य। मैं दोबारा जांच कर कि मैं बूटस्ट्रैप से पहले jQuery में शामिल हैं, छिपा हुआ नहीं होता है तो समस्या नहीं हो सकता।
मुझे हमेशा निम्न त्रुटि मिलती है:
TypeError: 'undefined' is not a function (evaluating 'jQuery('#myModal').modal('hide')')
मोडल इस तरह दिखता है:
<!-- Modal -->
<div aria-hidden="false" aria-labelledby="modalInviteFlatmateLabel" role="dialog" tabindex="-1" class="modal hide fade in" id="myModal">
<form id="add-flatmate-form" action="/flatmates/show" method="post">
<div class="modal-header">
<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
<h3 id="modalInviteFlatmateLabel">Invite Flatmate</h3>
</div>
<div class="modal-body">
<p>
Enter the mail address of your flatmate you want to invite.
</p><br />
<input placeholder="E-Mail" class="input-block-level" name="AddFlatmateForm[email]" id="AddFlatmateForm_email" type="text" /> </div>
<div class="modal-footer">
<input class="btn btn-primary" type="submit" name="yt0" value="Invite" id="yt0" /> <!--<button class="btn btn-primary">Invite</button>-->
</div>
</form>
</div><!--#myModal-->
अतिरिक्त जानकारी:
- jQuery संस्करण: 1.9.1,
- बूटस्ट्रैप संस्करण: 2.3.2
कोई भी विचार ?
मोडल का संस्करण इस्तेमाल किया गया? –
क्या आप जांच सकते हैं कि 'jQuery (' # myModal ') द्वारा वापस किया गया है। डेटा (' bs.modal ') ' –
यह' अपरिभाषित ' – burki