When the Superior Court has jurisdiction over the custody and maintenance of the minor children of parents divorced, separated or living separate, and such children are natives of this State, or have resided five years within its limits, they shall not be removed out of its jurisdiction against their own consent, if of suitable age to signify the same, nor while under that age without the consent of both parents, unless the court, upon cause shown, shall otherwise order. The court, upon application of any person in behalf of such minors, may require such security and issue such writs and processes as shall be deemed proper to effect the purposes of this section.
N.J.S. § 9:2-2