The title character is Ralph Newton, the nephew of Squire Gregory Newton of Newton Priory. The squire has never married; he has an illegitimate son, also named Ralph Newton, whom he loves dearly. However, the estate is entailed, and after his death will go to his nephew Ralph; he cannot leave it to his natural son.
Ralph the heir is a spendthrift, and has run himself deep into debt. There are two ways in which he can extricate himself: by raising money on his future interest in the Newton estate, or by marrying Polly Neefit, the daughter of a wealthy breeches-maker who is one of his major creditors. Neither choice is a good one for him: the first might lead to the estate's being seized by his creditors upon the old squire's death; the second would mean allying himself to a family of a much lower social class, thus putting his own social standing at risk.
The squire, anxious to obtain full possession of the estate so that he can pass it to his son, offers to buy the heir's reversion. Ralph vacillates, hesitatingly proposes to and is rejected twice by Polly Neefit, and eventually accepts his uncle's offer. However, before the transaction can be completed, the squire is killed in a hunting accident and his nephew comes into full possession of the property and its large income.
Now safe from his creditors, the new squire is nevertheless harassed by Polly Neefit's father, who threatens him with legal action and embarrassing publicity if he does not continue seeking his daughter's hand. The matter is eventually resolved by Polly, who accepts the oft-repeated proposals of Ontario Moggs, son of a prosperous bootmaker, and induces her father to consent to the marriage despite his preference for the squire. In the meantime, Ralph the squire has proposed to and been rejected by Mary Bonner, the beautiful niece and ward of Sir Thomas Underwood; soon after this, she accepts an offer of marriage from the illegitimate Ralph.
The novel also describes a Parliamentary election in the fictional borough of Percycross, in which Sir Thomas, a Conservative, and Moggs, a Radical, are two of the four candidates for the two available seats. Both are eager that the election be conducted fairly and honestly. The other two candidates, one a Conservative and one a Liberal, are the incumbents; they see nothing wrong with the buying and selling of votes that has been traditional at Percycross. Sir Thomas and his fellow Conservative win the election, but it is annulled on petition, and the borough is disfranchised by Parliament because of its pervasive corruption.

Question: Where did a Parliamentary election take place?
Answer: In the fictional borough of Percycross.
Alternative answer: The Borough of Percycross