2013-10-31 55 views
1

我在我的phtml页面和一个twitter引导程序模型 中包含Google地图js,但在Chrome上它不起作用。它如何影响?因为黑色背景显示,并且直到双击才会出现,所以我无法关闭模型中的按钮。Twitter bootstrap Modal在Chrome上使用Gmap

<button id="profile_btn_message" class="btn profile-btn" href="#myModal" role="button" data-toggle="modal"> 
    <?php echo $this->translate('contact'); ?> 
</button> 

和我的模态股利是

<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" class="text-center "> 
      تنبيه 
     </h3> 
    </div> 
    <div class="modal-body text-right font-bold" style="font-size: 18px;line-height: 25px;"> 
     عزيزي المستخدم 
     <br /> 
     يمكنك الان مراسلة الطبيب لتحديد موعد للمراجعة او ارسال استفسار خاص لنفس الطبيب 
     <br/> 
     <span style="color: #F5517A"> 
      ملاحضة: 
     </span> 
     : في حال لم تتضمن المراسلة للاحتمالات المذكورة اعلاه سوف يتم تحويلها كسؤال على الموقع او رفض المراسلة 
    </div> 
    <div class="modal-footer"> 
     <button id="message_cancle" class="btn pull-right" data-dismiss="modal" aria-hidden="true" >اغلاق</button> 
     <?php if (isset($this->location['location_id'])) {?> 
     <button id="message_continue" class="btn pull-right margin-right-5px" data-dismiss="modal" aria-hidden="true" onclick="sendEmail('<?php echo $this->escape($this->url(array('location_id' => $this->location['location_id']), 'ajaxMessageSend')); ?>');">استمرار </button> 
     <?}?> 
    </div> 
</div> 
+1

请问你可以在这里添加你的模态分区代码吗? – 2013-10-31 02:39:54

+0

@optionaloptional我编辑了这个问题 – KJA

回答

2

有切换一个模式的另一种方式 - 通过使用JavaScript。

在代码中包括下面的代码片段:

<script type="text/javascript"> 
$('#myModal').modal('show') 
</script> 

添加锚标记,用于切换的模式,看看你的模式现在工作:

<!-- Button to trigger modal --> 
<a href="#myModal" role="button" class="btn" data-toggle="modal"> <?php echo $this-  >translate('contact'); ?> </a> 

PS - 请记住,包括bootstrap.min.js或bootswatch.js文件之一。不要同时包含这两个。

希望这个工程:-)

相关问题