Показать сообщение отдельно
  #3 (permalink)  
Старый 04.02.2014, 19:55
Аспирант
Отправить личное сообщение для Synov_son Посмотреть профиль Найти все сообщения от Synov_son
 
Регистрация: 02.08.2013
Сообщений: 74

Да, Вот html
<div id="menu" style="width:400px;height:400px;">
	<img id="0" src="images/flavors/Blackberry.png" alt="Blackberry" width="60" height="42" style="top:421px;left:223.07692307692px">
	<img id="1" src="images/flavors/Blueberry.png" alt="Blueberry" width="60" height="42" style="top:403.70909152852px;left:304.42425169208px">
	<img id="2" src="images/flavors/Cherry.png" alt="Cherry" width="60" height="42" style="top:354.82612127177px;left:371.7058881724px">
	<img id="3" src="images/flavors/Chocolate sprinkles.png" alt="Chocolate sprinkles" width="60" height="42" style="top:282.80339887499px;left:413.28822633595px">
	<img id="4" src="images/flavors/Coconut.png" alt="Coconut" width="60" height="42" style="top:200.09430734647px;left:421.98130215058px">
	<img id="5" src="images/flavors/Hazelnut.png" alt="Hazelnut" width="60" height="42" style="top:121px;left:396.28200383381px">
	<img id="6" src="images/flavors/Kiwi.png" alt="Kiwi" width="60" height="42" style="top:59.196601125011px;left:340.63397353542px">
	<img id="7" src="images/flavors/Mango.png" alt="Mango" width="60" height="42" style="top:25.370479853239px;left:264.65926124048px">
	<img id="8" src="images/flavors/Oreo pieces.png" alt="Oreo pieces" width="60" height="42" style="top:25.370479853239px;left:181.49458491337px">
	<img id="9" src="images/flavors/Pineapple.png" alt="Pineapple" width="60" height="42" style="top:59.19660112501px;left:105.51987261843px">
	<img id="10" src="images/flavors/Pomegranate.png" alt="Pomegranate" width="60" height="42" style="top:121px;left:49.871842320035px">
	<img id="11" src="images/flavors/Rainbow sprinkles.png" alt="Rainbow sprinkles" width="60" height="42" style="top:200.09430734647px;left:24.172544003268px">
	<img id="12" src="images/flavors/Raspberry.png" alt="Raspberry" width="60" height="42" style="top:282.80339887499px;left:32.865619817892px">
	<img id="13" src="images/flavors/Strawberry.png" alt="Strawberry" width="60" height="42" style="top:354.82612127177px;left:74.447957981444px">
	<img id="14" src="images/flavors/Tangerine.png" alt="Tangerine" width="60" height="42" style="top:403.70909152852px;left:141.72959446176px">
</div>

#menu, #slideshow {
	position: relative;
}
#menu img {
	position: absolute;
}

function rotate(){
	var images = $('#menu img').length;
	var a = 2*Math.PI/images;
	var r = $('#menu').height()/2;
	var iheight = $('#menu img').height();
	var iwidth = $('#menu img').width();
	var y0 = +$('#menu #0').css('top').replace( 'px', '');
	var y = y0 - iheight/2;
	var a0 = Math.asin( 1 - y/r );
	for(var i=0;i<images;i++){
		a0 += a;
		itop = ( r*(1 - Math.sin(a0)) ) + (iheight/2);
		ileft = ( r*(1 + Math.cos(a0)) ) + (iwidth/2.6);
		$('#menu #'+i).animate({'top':itop,'left':ileft}, 1200, 'easeOutQuart');
	}

function play_menu(){
	return m_interval = setInterval(rotate, 2000)
}
$(document).ready(function() { play();});
}
Ответить с цитированием