Static electricity occurs when there is a build up of electric charge on the surface of a material without the flow of electric current. It results from the transfer of electrons between two materials during friction like rubbing a balloon on hair. This can cause attraction between materials with opposite charges like a negatively charged balloon and positively charged hair. Common examples are rubbing a plastic ruler to attract paper or walking on carpet and touching a doorknob to discharge. Different materials have different tendencies to gain or lose electrons through friction based on their electron affinity.