You're characterization of how it happened is intentionally absurd. I'll excuse that. What Democrats (falsely) claim is that it was the attitudes of the members of the parties that changed. That is equally absurd, but not equally excusable. The change was done cynically and for purely political reasons.
First, the Republicans have always been for ☞ equal ☜ rights (as equal as the day and age would allow.) That hasn't changed one bit.
What changed was the Democrats. Prior to the later half of the 1930's, The Democrats were high handed, physical, emotional and financial oppressors of black (minority) Americans. The Republicans put an end to the Democrats use of government and the law to oppress. The Democrat Party leaders understood what this meant: Blacks, now being able to vote, were going to vote for the Republican Party. Their solution to their being stripped of using force based enslavement, they swapped over to using dependency based enslavement; i.e., pandering.
Many in the Democrat Party base didn't understand the long term effect this would have on people. They believed the minorities were getting special favors that they wanted for themselves. These expatriate democrats had no where to go but to start backing the Republican Party, where they were only looked upon favorably by the Party leaders; again, cynically as voters. That's kind of a shame because it gives modern day Democrat demagogues the phrase "Southern Stratagy" to throw around as if it were meaningful. More importantly, the base of the Republican Party didn't, and to this day hasn't, accepted the white supremacy or racism of the former Democrat registrants.
The Democrats are the party of propaganda. They have to be. None of their solutions to anything actually works. They are tremendously wrong about everything and will propagate social problems forever. They need them to keep check on their followers.
The Sixties generation of Democrats had eaten the propaganda whole. They'd forgotten why they pandered to minorities and the party leaders were happy to have them think the party really did have the best interests of minorities at heart. They kept the votes either way, and the anti-Republican propaganda came ready made.