Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Posts
    405
    Thanks
    17
    Thanked 2 Times in 2 Posts

    ipad and .load issue?

    I have a strange little glitch only on Ipad and I'm not sure what causes it.

    I have some simple code on the page to load a new php file when they select a menu item. The first choice loads to the page, when they user arrives. If they click the other options, the section doesn't load. Yet, if they change orientation, or brush the page with their finger, the .loaded page will appear where it's supposed to as if nothing was wrong??

    Here's what I've got:
    Code:
    $(document).ready(function(){
    	
    	$('#mapss').load('/inc/floorplans/mapgroup1.php');
    
    $('#levels_23,#levels_45678,#penthouse_collection').click(function(){
    
    		$('.floorplate_subnav').removeClass('floorplate_selected'); // side nav
    		var selected_li =  $(this).attr('id');
    		
    
    		if ( selected_li == "levels_23"){
    			$("#li_1").addClass('floorplate_selected');
    			$('#mapss').load('/inc/floorplans/mapgroup1.php')
    			$(".unit_details").css('opacity',0);
    		} 
    		else if ( selected_li == "levels_45678"){
    			$("#li_2").addClass('floorplate_selected');			
    			$('#mapss').load('/inc/floorplans/mapgroup2.php')
    			$(".unit_details").css('opacity',0);
    			
    		} 
    		
    		else if ( selected_li == "penthouse_collection"){
    			$("#li_3").addClass('floorplate_selected');
    			$('#mapss').load('/inc/floorplans/mapgroup3.php')
    			$(".unit_details").css('opacity',0);
    			$("#li_3").addClass('floorplate_selected');
    			
    		} 
    		
    		else {
    			/* do nothing */ 
    		}
    
    	
    		$(setgraph).attr('class','graph_selected');
    
    	});
    });
    </script>
    
    
    <div class="floorplates">
    	<div class="article">
    		<h2 class="h2_whiteBg" style="position:relative;top:10px;left:10px;">FLOORPLATES</h2>		
    		<div style="float:left;">
    		<!-- this div contains the nav and green box at left -->
    			<div style="width:200px;position:relative;left:10px;top:0px;line-height:1em;">
    			
    			<ul style="line-height:2em;z-index:2;width:199px;">
    					<li id="li_1" class="floorplate_subnav floorplate_selected" style="width:80px;"><a style="color:#000;" id='levels_23' href='#'>LEVELS 2/3</a></li>
    					<li id="li_2"  class="floorplate_subnav" style="width:115px;"><a style="color:#000;" id='levels_45678' href='#'>LEVELS 4/5/6/7/8</a></li>
    					<li id="li_3"  class="floorplate_subnav" style="line-height:1.12em !important;position:relative;top:5px;width:199px;padding-bottom:8px;letter-spacing:-.02em;"><a style="color:#000;" id='penthouse_collection' href='#'>THE PENTHOUSE COLLECTION<BR />LEVELS 9/10</a></li>
    					
    				</ul>
    				
    				
    			</div>
    		<div id="details_here">
    			<?php include 'floorplate_details.php' ?>
    
    			</div>
    			
    			
    		</div>
    		
    		<div style="float:right;border-left: 1px solid black;height:334px;width:555px;position:relative;top:-43px;padding:10px;">
    		<!-- this div contains the floorplans at right -->
    		<div id="unit_rollovers" style="height:0px;overflow:visible;z-index:100;">
    			
    			
    			<span id="mapss"> </span> <!-- here's where it should appear -->
    			<div style="height:0px;width:300px;overflow:visible;z-index:99999 !important;position:absolute;left:20px;top:313px;" class="notes">CLICK ON SUITE NUMBER TO SEE DESCRIPTION</DIV>	
    				
    						
    		</div>
    			
    			
    		</div>
    </div>

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,296
    Thanks
    10
    Thanked 584 Times in 565 Posts
    maybe moving the page with a document.body.scrollTop=1; after loading the content will force a repaint.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Try adding return false; at the end of the click handler.

  • #4
    Regular Coder
    Join Date
    Aug 2010
    Posts
    405
    Thanks
    17
    Thanked 2 Times in 2 Posts
    No luck.. It seems to be an IOS 5 issue. IOS 6 works as expected.

    with no time to troubleshoot, I fell back to the oldfashioned hide/show div solution instead of loading pages.
    grr.

    even tried ajax() but no luck.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •