One of the mandatory conditions that must be met during wudhu is that water should be made to reach all parts of wudhu. One of the parts of wudhu is the head which must be wiped with the wudhu moisture left on the palm of the right hand. However, it is not always necessary to wipe on the skin of the head. In fact, if the wet fingers are pulled on the hair on the front part of the head, the wudhu would be in order. It is not necessary that the wiping of the head should be performed on its skin. It is also in order if a man wipes the hair on the front of his head. However, if the hair are so long that when combed they fall on his face, or on other parts of his head, he should wipe his hand on the roots of his hair, or part the hair and wipe the skin. If a person collects his hair on the front side of his head, or on other parts of his head and wipes them, or if he wipes the hair of other places, such a wiping would be void.
On the other hand, one who wants to perform wudhu must remove everything that forms an obstruction so as to make sure that water reaches the wudhu parts. Therefore, those individuals whose hair is short enough and who may wipe on their hair must make sure that there is nothing to prevent water from reaching their hair. In case, they have applied hair gel which forms an obstruction, it should be removed or else they should wipe with their hands on the skin of their heads.
 - Tawzih al-Masail (with annotation by Imam Khomeini), vol.1, pg. 157, Issue 251.