Yes, you will obtain the opponents item, it will not fail, and the target will be left without a held item.
"Switches hold items with the target. This move does not work if the target has Sticky Hold or Multitype, or is Giratina-O, or if either Pokémon is holding Mail. This move works even if the user has no item, but will fail if the user or target has had an item Knocked Off" - Smogon
Trick will also fail if the target is behind a substitut or has the ability multitype and is holding a plate.
Source: http://www.smogon.com/dp/moves/trick