0

I create horizontal scroller for run to the left and right the elements inside content , my script it´s this :

<script>
jQuery(document).ready(function() 
{
var $item = jQuery(".productos_items"), 
visible = 3, 
index = 0, 
endIndex=($item.length/visible)-1; 

jQuery('#productos_arrowR').click(function(){
if(index < endIndex ){
index++;
$item.animate({'left':'-=100px'});
}
});

jQuery('#productos_arrowL').click(function(){
if(index > 0){
index--;            
$item.animate({'left':'+=100px'});
}
});
});
</script>

I try something as this :

if ($item>=visible)
{
jQuery(".productos_items").css("display","none")
}

But no works

The problem it´s i can´t get hide the elements , for example i put visible first 3 items and after this i want hide the others and when push to the right show this and hide the other

I try different things but i can´t get this finally

Thank´s

1
  • nothing can help me ? Commented Oct 26, 2013 at 21:00

1 Answer 1

0

try this:

if ($item.length >= visible)    {
    $item.hide()
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.