css - Programmatically scroll ng-repeat with overflow:hidden -


I am using the following markup (ZE) to make a digit with AngularJS.

  ul pijijana took .o: A and lacquo; Li (ng-repeat = "months in months | order:" _ id "" ng-square = "month ._id === shown? 'Current': ''") a (ng- href = "# Months / {Month._id}} ") {{month._id | Monthly: 'Short'}} li.arrow # right-arrow: One & raquo;   

In CSS, I have set the overflow: hidden . I get this:

endorsement

Perfect, But obviously it can get long time

How can I scroll this when the user finally clicks on the small arrow symbols?

I've tried like $ (...). Animate ({left: '- = 20'}) But it only gets neglected (I'm guessing because of Foundation CSS) Any thoughts?

UPDATE

I have a semi-working solution, but it's ugly.

I changed the ng-show condition to list items such as:

  li (ng-repeat = "month in month | order: '' _ Id '"ng-class =" month._id ===' current ':' '"ng-show =" month ._id> = minute & month ._id & lt; = maximum ")   

and I do after loading my data

  $ timeout (function () {var AvailableWind = $ ('ul.pagination'). ) - 2 * $ ('ul li.arrow'). Width (); var itemWidth = $ ('li: not (.arrow)'). Width (); var total = math.flur (available width / madwidth); $ scope.min = $ scope ShownMonth - Math.floor (total / 2); $ Scope.max = $ scope.shownMonth + Math.floor (total / 2);});   

Then I basically just adjust the handler for minimum and max in ng-click The arrow button is more or less of this work, but for some reason, available wins are counted too much, which is actually much less than the space available for it - this is about 600 pixels Is off! Why?

Animate the left position does not make sense if you want to animate the horizontal scroll position (element. ScrollLeft).

Also, consider removing your arrow from the list of months. They do not make sense in that list, and when you want to scroll only months, they will force you, but leave the arrows in place.

Bella was edited to add: I did it for the quickness of jQuery, but the scroll left is an original javascript property.

This is CSS which is really important in comparison to Javascript:

  #pagination {text-align: center; } .nav {display: inline-block; Vertical-row: middle; } UL {Display: Inline-Block; Vertical-row: middle; Max-width: 75%; Hidden flurry; White-space: Abrop; } Li {Display: Inline-Block; List style: none; Color: #fff; Background: #aaa; Padding: 0.25 degree 0.5 AM; Margin: 0 0.5 AM; }   

Basically, you need the element that you can update the status of the scroll left. There is an overflow in that element: it is hidden on it so that its children can sit in a series within the element container (which is the result of white space: Abrop).

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -