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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Posts
    408
    Thanks
    17
    Thanked 2 Times in 2 Posts

    alternate to .load?

    I have an Ipad issue, where .load("page.php") isn't working properly.

    Is there a different way to write this? I saw some mention of using ajax() but I'm not sure how to write that out? The .load at the start of the function, works fine. but there are some weird issues with the .load that happens when the related link is clicked.

    Right now, I have:
    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"){
    
    			$('#mapss').load('/inc/floorplans/mapgroup1.php')
    
    		} 
    		else if ( selected_li == "levels_45678"){
    			
    			$('#mapss').load('/inc/floorplans/mapgroup2.php')
    			
    			
    		} 
    		
    		else if ( selected_li == "penthouse_collection"){
    			
    			$('#mapss').load('/inc/floorplans/mapgroup3.php')
    	
    			
    		} 
    		
    		else {
    			/* do nothing */ 
    		}
    
    	
    		$(setgraph).attr('class','graph_selected');
    
    	});
    });

  • #2
    Regular Coder
    Join Date
    Aug 2010
    Posts
    408
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Hmmm... I got ajax() to work, but it didn't solve my issues.
    I used:

    PHP Code:
    $.ajax({
    url'/inc/floorplans/mapgroup1.php',
    dataType'html',
    timeout5000// 5 seconds
    success: function(html) {
    $(
    "#mapss").html(html);
    }
    }); 

  • #3
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    Are by any chance the elements #levels_23,#levels_45678 and #penthouse_collection part of the content that you first load to #mapss?


  •  

    Posting Permissions

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