SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Explorer jquey issue - not always working..

    In firefox and Chrome its working perfect
    but when im using Explorer 9/8
    the following script isn't always working (only if i refresh the page a few times)

    i've added the $.ajaxSetup({ cache: false}); statement since it wasn't working even in explorer 9 without that statement..
    how can i fix this annoying error? i am using jQuery 1.2.6 (and i can't update).
    HTML Code:
    	<script type="text/javascript">
    		$.ajaxSetup({ cache: false});
    		
    		function ajax_load(_tag)
    		{
    			$.get("<?php echo $this->ajax_url; ?>", { <?php echo $this->ajax_get_string; ?>, tag: _tag.slice(1) },
    		   		function(data){
    		   	 		 $(".content").html(data);
    		  	 	});
    		}
    	
    		temp_tag = window.location.hash;
    		
    		var _tag="#content";
    		if (window.location.hash.length > 0) {
    			$(_tag).removeClass("selected");
    			_tag = window.location.hash;
    			$(_tag).addClass("selected");
    		}
    		ajax_load(_tag);
    		
    		$('.tab-menu li a').click(function() {
    			$(_tag).removeClass("selected");
    			$(this).addClass("selected");
    			_tag = $(this).attr('href');
    			ajax_load(_tag);
    		});
    	</script>

  2. #2
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    When you say it isn't working, what do you mean? What are you expecting, and what happens instead?
    I'm the web overlord for Graphic Business Systems


Bookmarks

Posting Permissions

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