“and the earth quaked.” God helped Israel by adding an earthquake at the very time of Jonathan’s attack, which added to the fear and panic among the Philistines.
“it was a trembling from God.” This great trembling (the Hebrew can also mean “panic”) came from God, who was now actively fighting for Israel. Occasionally the word “God” is used in Hebrew to express something that is large, excessive, or superlative, which explains why some versions read something such as “an exceeding great trembling” (ASV) or “a very great panic” (ESV). However, in this context it seems most logical that the text is letting the reader know why, not just the Philistine garrison that was attacked by Jonathan, but the whole Philistine army, was suddenly struck with great fear and ran away. God sent a great panic on the Philistines.