I have a load of fixed width divs inside a dynamic width div. The fixed divs all go next to each other and eventually wrap. What I want is to detect if one div ends up on a line on it's own. The only way I can think of for doing this is detecting where the divs wrap but I haven't been able to figure out how. Help is really appreciated.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
so you want to know if the div is on it's own row?
you can check each div's offsetTop to check against the other div's if they are on the same row. if the div's offsetTop dont match any of the others, then it's on it's own.