amitabhaghosh197
7/28/2014 - 10:19 AM

Bootstrap Modal

Bootstrap Modal


//Since My Modal is window on load so add

jQuery(window).load(function($){
jQuery('#myModal').modal('show', function(e){

				

				if(!data) return e.preventDefault();

				

				

				} );
				
});
<div class=" modal hide fade" id="myModal" >
                              <div class="modal-header">
                              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
								
								</div>
                                <div class="modal-body">
                       <?php
												  
												  $args = array(	
																
																'post_type'       =>  'pop-ups',
																'order'    => 'DESC',
														); 
				
				$the_query = new WP_Query( $args );
				if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
                
                                                          <div >
                                                          <!---<div style="width:100%;">  <img src="<?php //echo wp_get_attachment_url(get_post_thumbnail_id($post->ID,'')); ?>"></div>--->                                                  <p><?php   the_title();      ?></p>
                                                            <p><?php   the_content() ;?></p>
                                                              
                                                              </div> <!------/.students-quotes 1------------------------>
                                                              
                                                          <?php wp_reset_postdata();  ?>    
                                                           <?php endwhile;   ?>  
                                                           <?php endif;   ?>  
                                                           
                                                           
                                                           </div>
                                                           
                                                            <div class="modal-footer">
                                                            <a href="#" class="btn" data-dismiss="modal" aria-hidden="true">Close</a>
                                                            
                                                            </div>
                                                          
															</div>