Hi, im trying to create a sliding horizontal menu with different categories.
I would like to use one div layer that has a fixed width value, and another div inside this one with more width that the first one. This way only part of this second div could be visible.
Im having two problems:
The categorylist html code is not working properly, instead see part of the second div, i see all with a carriage return.
I'm trying to move the second div to right and left when a user puts the mouse over the <> signs at both sides of the category list.
Could you give me a hand, here is my code:
<div style="overflow: hidden;width: 710px;height: 17px;">
<div id="CategoryList">
<span id="NavigateBackward"><</span>
<p class="MiniCategory" style="display: inline;">Category 1</p>
<p class="MiniCategory" style="display: inline;">Category 2</p>
<p class="MiniCategory" style="display: inline;">Category 3</p>
<p class="MiniCategory" style="display: inline;">Category 4</p>
<p class="MiniCategory" style="display: inline;">Category 5</p>
<p class="MiniCategory" style="display: inline;">Category 6</p>
<p class="MiniCategory" style="display: inline;">Category 7</p>
<p class="MiniCategory" style="display: inline;">Category 8</p>
<p class="MiniCategory" style="display: inline;">Category 9</p>
<p class="MiniCategory" style="display: inline;">Category 10</p>
<p class="MiniCategory" style="display: inline;">Category 11</p>
<p class="MiniCategory" style="display: inline;">Category 12</p>
<p class="MiniCategory" style="display: inline;">Category 13</p>
<p class="MiniCategory" style="display: inline;">Category 14</p>
<span id="NavigateFordward">></span>
</div>
</div>
<script language="javascript" type="text/javascript">
$(document).ready
(
Initialize()
);
function Initialize()
{
InitList();
}
function InitList()
{
$("#NavigateBackward").hover
(
function()
{
$("#CategoryList").animate({ "left": "-=50px" }, 1500);
}
);
$("#NavigateFordward").hover
(
function()
{
$("#CategoryList").animate({ "right": "+=50px" }, 1500);
}
);
}
</script>
Thanks in advance for your help. Kind Regards. John.