When a state is trying to decide who should have custody over a child, they are always going to want to consider what is in the best interest of the child. They often want to keep a family together, but they want to make sure that the parent is fit to provide for the child. There are many factors involved that you can expect a court to judge in order to come to the best solution.
One factor that a court will consider when making a decision is the age of the child. Although the viewpoint that a younger child should live with their mother is outdated to some degree, it still holds true in court. If the mother has been the primary caregiver, then they may want the child to live with the mother.
The court will also consider the living situation of each parent. Sometimes in a case the parent that stays in the family home is granted custody. The family home can be viewed as a space of stability for the child. It will also allow a child to go about their daily lives the same way that they were doing. In some situations the parent that has custody over the child is awarded with the family home. If your living situation is not ideal while you are trying to get back on your feet after a divorce, then you will not receive custody of your child. The court wants your child to be living in an ideal, safe , and stable location. How far away your home is from your spouse will also make a difference in the court's decision. The court will want the child to be close to their school and regular activities.
Another aspect that usually makes a difference in the decision of the court when granting custody is how willing you are to support your child's relationship with the other spouse. They want you to be supportive of each other, and be on decent terms. They want the parent to cooperate . In relationship to the way a parent views the other parent, the court will also consider each parent's relationship with the child. If there is a parent that has proven to not really be involved in the life of the child, then a judge may make the other parent the one who is granted custody.
When a child hits their teen years or an age close to that, the court will also consider what the child prefers to do. The court may talk with the child to find out what they prefer in terms of custody and visitation. Some courts actually disapprove of bringing the children into the situation at all. It's important to understand the differences in law between the different states.
The court really just wants to put the child in a situation that is best for them as well as somewhere safe. If they find out that one parent had been abusive, neglecting, or is not stable enough to take care of the child, then they will put the child in the hands of the other parent. The child's interest is always what is most important.