Последните 2 грешки, които не мога да поправя

t0shk0

Registered
Последните 2 грешки, които не мога да поправя
http://validator.w3.org/check?uri=http%3A%2F%2Ftodortodorov.org%2Fprojects.php&charset=%28detect+automatically%29&doctype=Inline&group=1&user-agent=W3C_Validator%2F1.1
Идеи ? ;)
 
тоя javascript който си го изсипал директно там, го направи на отделен файл и го извикай. За да видиш дали точно това е проблема махни тоя javascript и тествай валидността ;)
 
Без JS няма грешки от него е..
А с include ли да го извикам от др. файл
Така ?
Код:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<?php include "... .js"; ?>

А в др. файл
Код:
<script type="text/javascript">

$(document).ready(function() {

	$(".paging").show();
	$(".paging a:first").addClass("active");
		
	var imageWidth = $(".window").width();
	var imageSum = $(".image_reel img").size();
	var imageReelWidth = imageWidth * imageSum;
	
	$(".image_reel").css({'width' : imageReelWidth});
	
	rotate = function(){	
		var triggerID = $active.attr("rel") - 1; 
		var image_reelPosition = triggerID * imageWidth; 

		$(".paging a").removeClass('active'); 
		$active.addClass('active'); 
		
		$(".image_reel").animate({ 
			left: -image_reelPosition
		}, 500 );
		
	}; 
	
	rotateSwitch = function(){		
		play = setInterval(function(){ 
			$active = $('.paging a.active').next();
			if ( $active.length === 0) { 
				$active = $('.paging a:first'); 
			}
			rotate(); 
		}, 4500); 
	};
	
	rotateSwitch(); 
	
	$(".image_reel a").hover(function() {
		clearInterval(play); 
	}, function() {
		rotateSwitch(); 
	});	
	
	$(".paging a").click(function() {	
		$active = $(this); 
		clearInterval(play); 
		rotate(); 
		rotateSwitch(); 
		return false; 
	});	
});
$(document).ready(function(){
						   		   
	$('a.poplight[href^=#]').click(function() {
		var popID = $(this).attr('rel'); 
		var popURL = $(this).attr('href'); 
				
		var query= popURL.split('?');
		var dim= query[1].split('&');
		var popWidth = dim[0].split('=')[1]; 

		$('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"><img src="images/close_pop.png" class="btn_close" title="Close Window" alt="Close"/></a>');
		
		var popMargTop = ($('#' + popID).height() + 80) / 2;
		var popMargLeft = ($('#' + popID).width() + 80) / 2;
		
		$('#' + popID).css({ 
			'margin-top' : -popMargTop,
			'margin-left' : -popMargLeft
		});
		
		$('body').append('<object id="fade"></object>'); 
		$('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); 
		
		return false;
	});
	
	

	$('a.close, #fade').live('click', function() { 
	  	$('#fade , .popup_block').fadeOut(function() {
			$('#fade, a.close').remove();  
	}); 
		
		return false;
	});

	
});
</script>
 

Back
Горе