Ladd, J.
The petition praying that the bonds of matri*744mony be severed was filed August 7, 1913. The original notice was served personally on the defendant in Pottawattamie County; and, on September 3d of the same year, he specially appeared and challenged the jurisdiction of the court on the grounds that the plaintiff, at the beginning of the suit, had not resided in Iowa the year preceding, and that he was not a resident of Iowa. This was overruled September 20th, and on September 30, 1913, as he did not appear generally, default was entered against him, and on hearing, a decree of divorce, including an order awarding the custody of their child, Melvin A. Scott, then five years of age, to the plaintiff, was entered as prayed. On October 22d following,* the defendant moved that the portion of the decree giving plaintiff the custody of the child be stricken therefrom, and this motion was sustained on stipulation of the attorneys, November 29, 1913. The plaintiff moved, on February 5, 1914, for an order amending the decree and awarding plaintiff the custody of the child, on two grounds: (1) The order entered November 29th was without personal notice to her and without her knowledge or consent; and (2) for that defendant is without home or place for the proper care of the child, and the latter’s interest would be best served if he be in plaintiff’s custody. By way of resistance, defendant alleged plaintiff to be an improper person to have custody of the child because of being without means and morally unfit.
1. Divorce : custody of children : modification of decree : when authorized. I. An examination of the record discloses that there has been no material change in the circumstances or situation of the parties since the entry of the decree, September 30, 1913. If one were then the better suited to care for their son than the other, as the court then decided, the decree should not be modified. Ferguson v. Ferguson, 111 Iowa 158; Crockett v. Crockett, 132 Iowa 388; Youde v. Youde, 136 Iowa 719.
*7452. Judgment: opening or vacating : passing of term: notice of proceeding to vacate. 3. Attorney and client: authority: when terminated. *744II. The modification of the decree, by striking therefrom the provision relating to the custody of the child, was *745without authority. This order was entered at the term following that at which the decree was entered, and therefore could not properly have been made on the court’s own motion or without notice to the plaintiff. Perry v. Kaspar, 113 Iowa 268; McConnell v. Avey, 117 Iowa 282; Ellis v. Remley, 115 Iowa 381; Okey v. Sigler, 82 Iowa 94; Hawkeye Ins. Co. v. Duffle, 67 Iowa 175. That the plaintiff knew nothing of the filing of this motion to strike, and received no notice thereof, is not disputed, nor had s^-e employed counsel to represent her, save in procuring the decree of divorce, being attorneys other than those now representing her. Their engagement ended with the entry of the decree. The employment of attorneys to prosecute suit always terminates with judgment or decree, unless something consequent thereof is to be done to render the judgment or decree or fruits thereof effective or available. 3 Am. & Eng. Ency. of Law (2d Ed.) 329; 4 Cyc. 952. As plaintiff was then in possession of the child, there was nothing more to be done, and her thén attorneys were without authority to appear in response to the motion to strike, or to enter into any stipulation with reference thereto. It follows that the court was without jurisdiction in striking from the decree the order giving the custody of the child to the plaintiff, and such order- should have been expunged from the record, or, what would have been equivalent thereto, the decree should have been amended, as prayed in the motion, by restoring it as originally entered, giving plaintiff the custody of the child.
4. divorce :petition: necessary allegations: residence: dismurrer.
*746
5. Divorce: jurisdiction: residence of parties: special appearance.
*745III. It is argued, however, and the district court so found, that the court was without jurisdiction in entering the original decree, in that the petition did not allege jurisdictional facts. It averred that the “plaintiff js a resident of Council Bluffs, state of Iowa, and such residence has been in good faith and not for the purpose of obtaining a decree of *746divorce only.” There was no other allegation with reference to the residence of either party. The theory of the defendant is that, independent of statute, the courts are without jurisdiction to grant divorce, and that, as such jurisdiction is conferred in connection with the procedure prescribed, this also is jurisdictional and must be pursued strictly. This is correct, in so far as the matter of residence is concerned; for Section 3171, Code, 1897, declares that “the district court in the county where either party resides has jurisdiction of the subject-matter of this chapter.” If “one of the parties to a marriage contract resides in the county, jurisdiction of the subject-matter is conferred on the district court, and the statutes relating to its exercise are to be interpreted and construed as are others relating to procedure.” Gelwicks v. Gelwicks, 160 Iowa 675; Richardson v. King, 157 Iowa 287; Mengel v. Mengel, 145 Iowa 737. Undoubtedly the petition was defective, and must have been so held on demurrer. It was not assailed, however, and as, under the statute quoted, the court was given jurisdiction over the subject-matter and acquired jurisdiction over the person by service of the original notice on defendant within the county, nothing was wanting in its authority to pass on the issues involved. Our statute differs from those in many states in not exacting, as a prerequisite to jurisdiction, residence within the state a specified time. Rumping v. Rumping, (Mont.) 12 L. R. A. (N. S.) 1197, and note.
6. divorce : jurisdiction: residence of parties: adjudication: collateral attack. ■ The fact -that either party is a resident confers on the courts of this state the power to hear and determine the issue affecting complainant’s status as raised in the petition. Whether the residence of the parties hereto Was such as to endow the court with such power was specifically raised by defendant ™ specially appearing, on the grounds that plaintiff had not been a resident of the state a year preceding the commencement of the action, and the *747defendant had never been a resident of the county. Jurisdiction over the subject-matter may not be questioned in some states on special appearance (Elliott v. Lawhead, 43 Ohio St. 171), while the rule in others permits that over subject-matter, as well as person, to be challenged. Porter v. Chicago & N. W. R. Co., 1 Neb. 14; Meixell v. Kirkpatrick, 29 Kan. 679.
Sec. 3541, Code Supp., 1913, provides that:
“Any defendant may appear specially for the sole purpose of attacking the jurisdiction of the court. Such special appearance shall be announced at the time it is made and shall limit the party to jurisdictional matters only and shall give him no right to plead to the merits of the case. ’ ’
This conferred the right on the defendant to appear and specifically object to the jurisdiction of the court, either over his person or the subject-matter of the suit. His application was strictly within the scope of the statute, and invoked the jurisdiction of the court to pass only on the question as to whether the court had jurisdiction over the subject-matter, i. e., whether the residence of the parties was such that the court might entertain the suit for divorce on the merits. The ruling was necessarily defended on a finding of facts by the court and adverse to the defendant. Whether he then might have pleaded to the merits without waiving exception to the ruling is a point on which the authorities are in conflict. As he did not plead to the merits, the error in the ruling, if such it were, was available to him on appeal; and, as he did not so challenge it, the order of the district court in holding the residence of one or both of the parties such as to confer jurisdiction is binding on him. That he accepted it as such appears from his subsequently recognizing the validity of the decree by moving to correct it by striking a portion therefrom and in not assailing it in any manner in resisting plaintiff’s motion to amend by restoring the clause stricken on his motion. We are not to be understood as approving or disapproving this ruling. All now held is that the defendant, having procured an adjudication on the issue as to whether the court *748had jurisdiction to entertain the suit, is not in a situation to ignore the same and treat or have treated the decree as a nullity. Possibly on appeal it might have been reversed. But .defendant did not avail himself of that remedy. Having •invoked the power of the court to pass on the issue of whether it had jurisdiction to hear, depending on the facts as the court might find them, and decide, its decision thereon was quite as conclusive and no more subject to collateral attack than had the ruling been on the merits of the case. The court erred in treating the decree of divorce as void, in not holding the order striking the clause awarding the child to plaintiff therefrom as void, because having been entered without jurisdiction; and, as there had been no change in the circumstances and conditions of the parties since, should have continued the child in the custody of plaintiff. — Reversed.
' Evans, C. J., Gaynor and Salinger, JJ., concur.