display 'loading wait..' till the popup div is loaded
dear sir
refer
when I Click
A pop up is displayed
I want Loading wait message to be displayed before pop is displayed
and this message should remain till full div is loaded
At present the Loading wait is not displayed
I am using
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
and my JQUERY Code
- <script type="text/javascript">
- jQuery(function($){ // local $ is jQuery!
- $("#closemyDiv").click(function(){
-
- $('#myDiv').slideUp(1000) ;
- $('#myDiv1').empty();
- $('#multizoom1').empty();
- $('#image1').empty();
- });
- $(".album").click(function(){
- var id=this.id;
- var id1=id.split('album');
- $('#myDiv').show(1000);
- // alert(id1[1]);
- var dname='load'+id1[1];
- $('#'+dname).show().delay(1000);
- //alert(dname);
-
- var url= "projectimagezoomfillmain.php"
- data = {
- id: id1[1]
- };
- $('#myDiv1').load(url,data,projectimagezoomover(id1[1]) ) ;
- });
-
- function projectimagezoomover(id)
- {
- var dname='load'+id ;
-
- $('#'+dname).hide().delay(1000);
-
- }
- $("#myDiv").on( "click", "#closemyDiv", function() {
- $('#myDiv').hide(1000);
- $("#myDiv1").empty();
- });
-
-
-
- jQuery.fn.center = function ()
- {
- this.css("position","fixed");
- this.css("top", ($(window).height() / 2) - (this.outerHeight() / 2));
- this.css("left", ($(window).width() / 2) - (this.outerWidth() / 2));
- return this;
- }
-
- $('#myDiv').center();
- $(window).resize(function(){
- $('#myDiv').center();
- });
- });
-
-
- </script>
php code that defines zoom image
- <table width="220">
- <tr>
- <td >
- <a href="<?php echo $albumimagesrows['actualimage'];?>" rel="<?php echo "lightbox".$albumimagesrows['id'];?>">
- <img src="<?php echo $albumimagesrows['smallimage'];?>" style="border:#a6cc37 1px solid; width:180px; height:123px;" />
- </a>
- </td>
-
- </tr>
- <tr>
- <td align="left" valign="top" style="padding-left:10px;"><span class="textregularblack"><?php echo $albumimagesrows['name'];?></span></td>
- </tr>
- <tr>
- <td align="left" valign="top" class="textregular" style="padding-left:10px; padding-top:7px; padding-bottom:10px; "><?php echo $alumimagesrows['detail'];?></td>
- </tr>
- <tr>
- <td align="left" valign="top" class="album" style="padding-left:10px; padding-top:7px; padding-bottom:10px; cursor:pointer " id="<?php echo "album".$albumimagesrows['id'];?>" >
- Zoom Image <div id='<?php echo 'load'.$albumimagesrows['id'];?>' style="margin-left:125px; margin-top:-20px; display:none">Loading Wait...<img src="loading-anim.gif" width="16" height="16" /></div>
- <label for="imageid"></label>
- <input name="imageid" type="hidden" id="<?php echo "imageid".$albumimagesrows['id'];?>" value="<?php echo $albumimagesrows['id'];?>" /></td>
- </tr>
- </table>