'bPopup'이라는 가벼운 jQuery 팝업 플러그인을 사용하고 있습니다. 내가 클릭 할 때 여러 개의 팝업 창을로드하는 순간 내 웹 사이트에서 사용하고 있습니다. 나는 최근에 내가 : 여러 자바 스크립트 '청취자와 함께 다수의 자바 스크립트'청취자 ^^bpopup multiple
<script type="text/javascript">
;(function($) {
$(function() {
$('#my-button_1').bind('click', function(e) {
e.preventDefault();
$('#element_to_pop_up_32754925023').bPopup();
});
});
})(jQuery);
</script>
<script type="text/javascript">
;(function($) {
$(function() {
$('#my-button_2').bind('click', function(e) {
e.preventDefault();
$('#element_to_pop_up_95031153149').bPopup();
});
});
})(jQuery);
을 즉 여러 팝업을로드하는 나의 코드가 비효율적이라고 들었다. 그리고, 팝업에 대한 :
그는 아마 오른쪽 (그것의 확인),하지만이 구현하거나 심지어 수 있는지 여부 (작은 기회 그가 잘못)하는 방법하지 않도록입니다<!-- Button that triggers the popup -->
<a class="main" id="my-button_1" href="#">Popup 1</a></b><br />
<!-- Element to pop up -->
<div id="element_to_pop_up_1">
// ...
</div>
<!-- Button that triggers the popup -->
<a class="main" id="my-button_1" href="#">Popup 1</a></b><br />
<!-- Element to pop up -->
<div id="element_to_pop_up_1">
// ...
</div>
.
도움 말? 그리고 감사합니다!
에 속함 : http://codereview.stackexchange.com/ –