Plan B question

If my partner and I had sex, I took the pill and then we did it after, with out a condom. Will it still work?