Return to Snippet

Revision: 57099
at May 16, 2012 03:35 by kbrown


Initial Code
<div id="topImages">

	<div class="slide-img"><img src="/images/home1.jpg" width="2298" height="438" /></div>
    <div class="slide-img"><img src="/images/home2.jpg" width="2298" height="438" /></div>

</div>


<script type="text/javascript">

$(document).ready(function() {
	
	$('#topImages').cycle({
		fx:'fade',
		sync: 1,
		speed:1000,
		timeout: 3000
	});
	
});

$(window).resize(function(){

function centerImages(){
      var imgW=2298;
      var mainW= $('#topImages').width();

      var margL=0-(imgW-mainW)/2;
      $('.slide-img img').css('marginLeft',margL);
}

centerImages();

});

$(window).resize();


</script>

Initial URL

                                

Initial Description

                                

Initial Title
cycle 100% centered images

Initial Tags

                                

Initial Language
JavaScript