Rise under King Bela IV of Hungary
In 1237, the Friar Julianus returned to the Volga Hungarians. While in OTL he found them eradicated by the Mongols, ITTL he started to convert them to Christianity and tried to recruit them to settle in Hungary. A delegation of them visited Hungary proper and liked the idea of settling there. Thus, king Bela could widen the population base of his country. Since his country wasn't ravaged by the Mongols, this helped him too. In 1243, he conquered Bosnia; and in 1246, he fought Austria, killing the last duke Friedrich II. Vlachia and Moldavia became Hungarian sphere of influence, and many Volga Hungarians settled there. In 1254, Hungary "divided" Styria with young king Venceslaus / Vaclav II. Hungary got the better part, only a few border cities became Austrian. Otakar Przemysl tried to improve the situation one year later, waged war against Hungary, but was defeated. In the same year, prince Stephen / Istvan married a princess of the Volga Hungarians.
In his last years, Bela had troubles with his son, who'd rebel against him in 1262, and practically got his own kingdom in Eastern Hungary. 1268, Prince Istvan invaded Bulgaria to widen his power base. Only the weakness of Byzantium and the crusader states, the Hungarian threat to Serbia and the fact that Hungary itself is close to be overextended prevented that Bulgaria was even worse off. In 1270, he died.
End of the Arpad dynasty
Just two years after becoming king, Istvan V died too, and Ladislaus / Laszlo IV followed him. In 1274, Hungary occupied Serbia. But in 1275, Otakar Przemysl, who had become Roman king in the meanwhile, attacked Hungary with his Bavarian allies, and this time he won. Styria was divided: Western / Upper Styria became part of Austria (thus connecting the Przemyslids' possessions), the rest (two thirds) became (Upper) Bavarian. The Serbs rebelled 1284 against the Hungarians under Stefan Uroš II Milutin of the former Serbian Nemanjić dynasty. Fightings went on for several years, but at the end, the Hungarians were stronger. In 1290, when Laszlo died, they had to make his last living relative king Andras III; he'd be the last king of the Arpad dynasty in Hungary, and he died quite soon too, in 1301.
Under various dynasties - the Seljuk threat
The nobles had elected the Wittelsbach duke Otto II of Lower Bavaria king, but in 1304 he left the country again, and they had to replace him by Louis / Lajos I of the Anjou dynasty. At this time, the Serbian rebellion under Stepan Hrebeljanović took place (1303-07). At the end, Hungary had to give them independence. The new Serbia under czar Stepan also included Bosnia. At least, until the 1350s Hungary extended its influence over the western Kumans (west of the Dniepr).
But in 1363, the Anjou dynasty died out too, so they chose the Polish kings to become kings of Hungary as well; but soon the second of them, king Kazimierz / Kázmér / Casimir was incompetent and often absent, so in 1371, they again changed dynasties, now electing Sigismund / Zsigmond I of Luxemburg. He conquered the Russian princedom of Halicz-Volhyn in an alliance with the Teutonic Order, which was divided between them in 1375.
But 1383-87 he had to fight the Rum-Seljuks who had crossed the Danube, defeated the Hungarians several times, and took control of Vlachia. After this, he managed to organize the last crusade 1388-91. The Hungarians and their allies could win some battles against the Seljuks, took Bosnia back, but no more. Even worse, in 1392/93 the Black Death stroke Hungary, being introduced by returning crusaders. The king also died of it. And after the Seljuks had a bit recovered from the Black Death, they stroke against Hungary again, 1396-1400. They occupied Moldavia, Bosnia and Slavonia (East Croatia). Later in 1431, Kiev managed to conquer back the areas Hungary took from Halich-Volhyn in 1375, since Hungary also had trouble with the Bohemian theocracy. Like the Anjous, the Luxemburg dynasty also ended with the death of the childless third king in 1432. Now they chose a Karl / Károly III from Hesse, who stayed quite unpopular in Hungary, so it was almost a relief when he died childless in 1460.
The Landshut dynasty and the defeat against the Seljuks
Only the entanglement of the Rum-Seljuks on the Italian peninsula had given Hungary a break. Unfortunately, the kings had missed the opportunity to strike back, or prepare otherwise. Under these circumstances, it was hard to find a candidate for the throne. Finally, they elected prince Ludwig of the Landshut branch of the Wittelsbach dynasty, making him king Lajos III. At the beginning neither side was happy about the situation; his son, king since 1473 Lajos IV, proved very popular however.
1480, the fear of a Seljuk attack became reality. For twelve years, the Hungarians fought, without assistance from abroad; but in 1492, the king himself fell in battle, and the country had to make peace: The Seljuks broke Hungary up, leaving only Slovakia and the western third to the king. The center and Croatia were annexed by them, Transsylvania became a tributary. The young king did his best to master the burden of his fate; but as soon as 1501/02, even the rest of Hungary was occupied by Seljuks; Lajos V had to flee Hungary, and would die in exile in 1539. His son would die in 1570, thus ending this dynasty too.
Hungary now was completely under Seljuk occupation.
Liberation and Bourbon rule
Now however, the great powers stroke back. The First French-Seljuk War 1567-74 made Hungary (if only the west) independent again in the Peace of Krems (Austria). France used this opportunity to make Hungary a close ally, leading to François of Bourbon elected new king Ferenc I of Hungary. The Great Seljuk War 1599-1604 gave core Hungary to Bourbon Hungary in the peace of Naples. After the second French-Seljuk War (1635-46), the peace of Györ gave Bourbon Hungary Croatia, Slavonia, Transsylvania and the Banat. And the Third French-Seljuk War (1668-74), which was joined by the South Russians, even gave Hungary Serbia and Bosnia in the peace of Belgrade, making it almost as strong as during its apex.
The country soon started to flourish again: 1607, the University of Gran (the old capital of Hungary) was re-founded.
In 1642, the Government of the "Twin princes" François / Ferenc III (also king of Poland) and Charles / Károly IV began. Introducing enlightened absolutism, they practiced religious tolerance, thus stabilizing the until then very shaky Hungary (having Catholics in Hungary and Slovakia, Orthodox in Transsylvania and Bohemian brothers in, well, Bohemia, made governing the state extremely difficult). Even the Jews and Muslims in the country profited from the new tolerance.
In 1712, Charles / Károly VI became king of Hungary. During his long reign, he reformed Hungary - taking many ideas and technologies from Russia (thus indirectly, China). In 1758, he had the first telegraph line in a Catholic country built.
After the Palatinate War of Succession, the Palatinate went neither to France nor Bavaria, but to a grandnephew of the king.
Although king Karoly wasn't happy about this decision, he joined the other monarchies in the French Republican Wars. This would lead at the end to the loss of the Czech and Slovak lands after the Second French Republican War in the peace of Basel 1784, which became the Moravian Republic, a French satellite.
When Russia diplomatically clashed with Hungary in 1834, emperor Alessandro I feared Russia invading Hungary at the wrong time. So he suggested the Hungarian Division: Austria went to united Germany, Croatia to New Rome, Transsylvania became a Russian protectorate. New Rome also acquired most of OTL Slovenia (which was once Austrian), so Germany was cut off from the Adria.