Yeah it would work if the tank were bigger and the jars were bigger. It's a good idea, and it's okay if they see eachother. The only time bettas shouldn't see eachother would be like my old boy Ember... If he were around other bettas he flared so much he ripped his fins. But that's just an exception. It's fine if they're by eachother. Dividers are see through.

Only problem with that is the water in the jars would not get filtered and would have to be cleaned separately. Costco sells HUGE jars of pickles, but I dont think you could ever get that smell out! :-p