| sergiocharm | 
			17.03.2013 12:48 | 
		 
		 
		
		 
		
		
			Кнопки Следующая, предыдущая   
		
		
		
		Ребята, помогите заставить работать кнопки вперед-назад, в имеющемся коде 
<src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
 
$(document).ready(function() {
	$('.image').click(function() {
		$('#image').hide().html('<a href="' + $(this).attr('rel') + '" ><img src="' + $(this).attr('rel') + '" /></a>').fadeIn('def');
		return false;
	});
});
<div class="vievfoto"> 
<div id="image"></div> 
<a href="javascript :void(0)" onclick="backImg(); this.blur();">Назад</a> / 
<a href="javascript :void(0)" onclick="nextImg(); this.blur();">Вперед</a> 
</div>
 
include("connect.php");
		$result = mysql_query("SELECT * FROM `wp_posts` ORDER BY RAND() LIMIT 40",$db);
		$comment = mysql_fetch_array($result);
		$i = 1;
		$num=1;
		do{
		if ($comment['post_parent'] != 0) { $foto = $comment['guid'];}
		echo "<a class='image' href='#' rel='".$foto."'><div class='adw'><img src='".$foto."' id='".$num."' /></div></a>";
	$i++;
	$num++;
}while($comment = mysql_fetch_array($result));
 
	 |