Spread the outside of the pita halves with the butter and arrange, buttered side down, on a work surface. Spread the cut sides with a thin layer of mayonnaise. Fill the sandwiches with the red onion, pepper Jack cheese and roast beef and close the sandwiches.
Preheat a skillet or panini press. Grill the sandwiches over low heat until the bread is toasted and the cheese is melted, 10 minutes. If using a skillet, press the sandwiches with a spatula and flip them halfway through. Cut in half and serve right away.