yes, it will be just fine in the fridge. hopefully you already have a piece of foil over the opening, if not sanitize one and cover it up.
i always put my starter in the fridge for about 48 hours before brewing - it's call cold-crashing. after that time the yeast will settle (flocculate) at the bottom of the jar/flask. when it comes time to use the starter, you can easily pour off the spent beer and pitch only the yeast slurry. that spent beer is way oxidized so it's best to keep it out of your beer. it's typically not a huge amount so not a big deal, but i'm a knit-picker and want only fresh beer in my final batch.