easySilder 1.7 jquery - 页面重新加载后移动到最新选定的幻灯片
我有一个用 easySlider 1.7 实现的菜单。
代码是这样的:
<div id="slider">
<ul>
<?
$rezultat = mysql_query("SELECT DISTINCT catid,name FROM categories ORDER BY name ASC");
$count = 1;
echo "<li>";
while($camp = mysql_fetch_array($rezultat))
{
if ($count <= 7)
{
$count++;
if ($pagina == $camp['catid'])
{
echo "<a href='index.php?catid=";
echo $camp['catid'];
echo "' style='color: #F00;'>".$camp['name']."</a><br />";
}
else
{
echo "<a href='index.php?catid=";
echo $camp['catid'];
echo "'>".$camp['name']."</a><br />";
}
}
else
{
$count = 1;
echo "</li><li>";
}
}
?>
</ul>
</div>
现在,在我单击菜单上的链接后,页面会重新加载,并且我会失去对“上一张当前幻灯片”的跟踪,其中我有选定的链接。
重新加载后如何转到该幻灯片或将其设为默认幻灯片?
PS:可以与ajax一起使用,但如果我使用ajax,我会遇到一些其他php生成的javascript变量的问题,这些变量取决于每个链接。您可以在以下位置查看预览:http://5election.com。请注意左下角的滚动菜单,这是我遇到的问题。
提前致谢。
I have a menu implemented with easySlider 1.7.
Code is like this:
<div id="slider">
<ul>
<?
$rezultat = mysql_query("SELECT DISTINCT catid,name FROM categories ORDER BY name ASC");
$count = 1;
echo "<li>";
while($camp = mysql_fetch_array($rezultat))
{
if ($count <= 7)
{
$count++;
if ($pagina == $camp['catid'])
{
echo "<a href='index.php?catid=";
echo $camp['catid'];
echo "' style='color: #F00;'>".$camp['name']."</a><br />";
}
else
{
echo "<a href='index.php?catid=";
echo $camp['catid'];
echo "'>".$camp['name']."</a><br />";
}
}
else
{
$count = 1;
echo "</li><li>";
}
}
?>
</ul>
</div>
Now, after I click a link on the menu, the page reloads and i loose track of "previous current slide" where I have the selected link.
How can i go to that slide after reload or make it default slide ?
PS: Works with ajax but if i use ajax i have problem with some other php generated javascript variables that depends of each link. You can see a preview at: http://5election.com. Notice the scrolling menu on the bottom left side that's I'm having problems with.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将当前幻灯片添加到超链接。
这样,当页面加载时,您就会知道它来自哪里。
You can add to the hyperlink the current slide.
In this way, when the page loads, you will know from where it came.