Hi ,

Im working on making a jquery image slider.

I just found out that im haveing a w3c validation error : document type does not allow element "img" here
because of my javascript code.

My code is in the header.

I understand the error message but what i dont understand is why it is giving it since its in my Javacript code.

Here is the website adress of my website:


<script type="text/javascript"> 
	var imgTextL= '<img class="'+$('.imgGal').filter(':last').attr('class')+  //variable containing the last image in the list 
		'" src="'+$('.imgGal').filter(':last').attr('src')+
		'" alt="'+ $('.imgGal').filter(':last').attr('alt') +'" />'  

		 $('#contenuTv').hide("slide", { direction: "left" }, 400 ,function () // load previous image
				$('.imgGal').filter(':last').remove() //remove the last image
				$('#contenuTv').prepend(imgText); // put the last image at the end of the list
				$('#contenuTv').show("slide", { direction: "right" }, 400);
		var imgTextL = '<img class="'+$('.imgGal').filter(':last').attr('class')+ //variable containing the First image in the list 
		'" src="'+$('.imgGal').filter(':first').attr('src')+
		'" alt="'+ $('.imgGal').filter(':first').attr('alt') +'" />'
		$('#contenuTv').hide("slide", { direction: "right" }, 400 ,function () // load next image
			$('.imgGal').filter(':first').remove() //remove the fisrt image
			$('#contenuTv').append(imgText); // put the first image at the end of the list
			$('#contenuTv').show("slide", { direction: "left" }, 400);

The sliding animations are sloppy in IE .. worcks great for firefox and chrome toght , it even work acceptably on my android.

Thank you for reding , hope you can help or point me in the right dirrection .