I'm trying to add a different ID to my nav's ul-list.
What am I doing wrong?
Can you add and remove ID's in jQuery or do I need to use JavaScript?
$(window).scroll(function () {
if ($(document).scrollTop() == 0) {
$('#logo_top').removeClass('remove-logo');
} else {
$('#logo_top').addClass('remove-logo');
}
});
$(function(){
$('#navi').data('size','big');
});
$(window).scroll(function(){
if($(document).scrollTop() > 0)
{
if($('#navi').data('size') == 'big')
{
$('#navi').data('size','small');
$('#navi').stop().animate({
height:'58px'
},600);
$('#navi-top ul').remove();
$('#navi-top-small ul').add();
}
}
else
{
if($('#navi').data('size') == 'small')
{
$('#navi').data('size','big');
$('#navi').stop().animate({
height:'122px'
},600);
}
}
});
this is the html for my site im trying to target the ul any suggestions?
<div id="navi-top" class="push-off-right-s">
<ul>
<li><a href="#">The Group</a></li>
<li><a href="#" class="active">Working Together</a></li>
<li><a href="#">Paymaster</a></li>
<li><a href="#">Claybrook</a></li>
<li><a href="#">Vote for a sidekick</a></li>
</ul>
</div>