सबसे पहले, समस्या का एक बेला: jsfiddle.netबूटस्ट्रैप पॉपओवर, पॉपओवर अंदर बटन को पकड़ने .click नहीं
मैं एक पॉपओवर का उपयोग कर रहा है, और यह सामग्री एचटीएमएल, वर्ग "click_me" के साथ एक बटन है। मेरे पास "click_me" पर क्लिक करने के लिए jquery है और इसे एक चेतावनी फेंकनी चाहिए। हालांकि, यह नहीं है। क्या मैं कुछ भूल रहा हूँ?
जे एस:
jQuery(document).ready(function($) {
$('.demo_button').click(function() {
$(this).popover({
html: true,
trigger: 'manual',
placement: 'right',
content: function() {
var $buttons = $('#popover_template').html();
return $buttons;
}
}).popover('toggle');
});
$('.click_me').click(function() {
alert('it works!');
});
});
HTML:
<button class="btn btn-primary demo_button">Click here</button>
<div id="popover_template">
<button class="btn click_me">Make Alert</button>
</div>
मैं इस तथ्य के बारे में नहीं सोच रहा था कि यह लोड पर नहीं बनाया गया था। धन्यवाद, यह एक सही जवाब है! –