The European Union has done away with roaming charges for mobile phones within the EU. So if you buy a SIM in Slovenia that allows roaming in other countries, your data will work for the same cost in Croatia. But in my understanding, the EU doesn't require a mobile company to offer roaming in other countries on all of their plans, only that they can't add extra roaming charges. So you need to choose a SIM company and plan that allows roaming.
Here's some info about Slovenian mobile companies - there are really only three (with others re-selling bandwith on one of the three):
http://prepaid-data-sim-card.wikia.com/wiki/Slovenia
I haven't bought a SIM in Slovenia for a few years, but I rented a car for a day and drove with Google Maps on my Android phone in Slovenia in May. I had a phone with data, but I didn't need data for GPS and kept the phone in airplane mode most of the time just to save data; I used Google Maps "offline," meaning I had pre-downloaded maps on WiFi ahead of time. It worked reasonably well with a few limitations (no traffic info, obviously.) So I don't know how much data I would have used had I left it on.
I had bought a Dutch Vodafone SIM ahead of time on eBay and used that in Slovenia, Italy, and France. Because there are no more roaming costs, the SIM worked great for data in all three countries (I didn't visit Croatia on my recent trip). I never even visited the Netherlands - I was able to top-up the SIM on the Dutch Vodafone website. If you buy a Slovenian SIM card, make sure you can top it up (if you need more data) once you get to Croatia, or you might have to buy another SIM card in Croatia. It looks pretty cheap to get a lot of data though so for a short trip like yours, I'd probably get about 3-4GB of data. On my recent trip (17 days) I used only 2GB of data total and was using the phone almost constantly for Google Maps walking directions (when I wasn't driving) and tethering to my laptop.