I need to extend a 14/2 WG wire a few feet. To do this I want to add the extra wire using a junction box. The problem is that I can't get a good angle to nail the junction box down so I was wondering if using Liquid Nails would be against code?
Article 314.23(B) of the National Electrical Code, says that the enclosure must be rigidly supported.
Whether or not liquid nails would meet this criteria may be up to interpretation, so it's best to check with your local inspector to determine if they'd allow it.
The other (better) option, would be to use an old work box. Which is allowed by subsection C of the same section.