
447 So.2d 169 (1984)
Robert MASSEY, as Father and Next Friend of Joan Teresa Massey, a minor
v.
Ernest WRIGHT and Glenda Wright.
82-713.
Supreme Court of Alabama.
February 10, 1984.
*170 Stephen J. Pettit of Knight & Griffith, Cullman, for appellant.
Eugene D. Martenson and Rebecca L. Shows of Huie, Fernambucq & Stewart, Birmingham, for appellees.
ADAMS, Justice.
This appeal arises from a personal injury suit filed by Robert Massey on behalf of his minor daughter, Joan Teresa Massey, who was injured while swimming in the defendants' swimming pool during a visit to their home. The amended complaint alleged negligence, negligence due to the defendants' failure to provide adequate safety devices for the pool, negligence in that the defendants had knowledge of a hidden peril and failed to notify Joan, negligence in the defendants' attempts to rescue the child, and willful and wanton injury. After extensive discovery, the defendants moved for a summary judgment. The court, after considering the affidavits, depositions, and briefs filed by both sides, granted summary judgment in favor of the defendants, and the plaintiff appealed.
Massey argues on appeal that the evidence presents a genuine issue of material fact under each of the following theories: (1) breach of duty owed to a social guest; (2) attractive nuisance; (2) dangerous instrumentality; (4) breach of duty to supervise a child entrusted to defendants' care; and (5) breach of duty imposed by a city ordinance. After a thorough review of the evidence that was before the trial court, we *171 disagree. The judgment of the trial court is affirmed.
The incident from which the suit arose happened as follows:
Joan Teresa Massey was invited by the defendants' daughter, Terry Wright, to spend the night at the Wright home on May 23, 1980. Both girls were twelve years old. Two other girls were also invited. It was known by all the children that the Wrights had a swimming pool, and they all brought bathing suits to the house. Mrs. Wright picked the girls up in her car at school around 12:00, brought them to her house, and prepared lunch for them. At about 3:00, Mrs. Wright left to pick up another child at school. On her return, she took all the children, including her 3-year-old, to the pool.
There is undisputed testimony that Mrs. Wright told the children not to go to the deep end of the pool, but to stay at the shallow end. Shortly after this instruction, Joan Massey ran around the pool to the deep end and jumped in feet first. Mrs. Wright followed Joan to the deep end of the pool. It appears from the testimony that Joan started rising toward the surface, although her face never cleared the water. Then, with no evidence of struggle or effort to swim, she sank back down. At this point she suddenly became limp and collapsed to the bottom of the deepest part of the pool. Joan's cousin, Jo Linda Smith, who was also at the party, screamed that Joan was having a seizure. The evidence indicates that Mrs. Wright had no knowledge, up to that moment, that Joan suffered from grand mal and petit mal seizures. The evidence is somewhat conflicting as to exactly what happened next, but it is undisputed that Mrs. Wright shouted for Terry to call the fire department, which she immediately did. Mrs. Wright then got a pole and was ultimately able to push Joan over to a sloping side of the pool, where she managed to reach her with her feet, pull her up until she got her with her hands, and carry her to the shallow end of the pool. From there, the other children helped to lift Joan from the water. Mrs. Wright then began to give Joan mouth-to-mouth resuscitation. Shortly thereafter, the rescue team arrived and took over the resuscitation efforts.
Joan was hospitalized for some time, and was still receiving speech and physical therapy at the time of her deposition. The treating physicians testified that she suffered oxygen deprivation during the incident. The extent of her injuries indicates that she was deprived of oxygen for five to ten minutes. She is now in special education classes. Her physicians testified that she is expected to have permanent brain damage.

1.
It is undisputed that on the date of the injury Joan Massey was a social guest of the Wrights. In Alabama a social guest is a licensee of the landowner. Bryant v. Morley, 406 So.2d 394 (Ala.1981); Morgan v. Kirkpatrick, 276 Ala. 7, 158 So.2d 650 (1963). The duty owed to a licensee by the landowner is not to willfully or wantonly injure him, or not to negligently injure him after discovering that he is in peril. McMullan v. Butler, 346 So.2d 950 (Ala.1977); Tolbert v. Gulsby, 333 So.2d 129 (Ala.1976). The reason for this rule is the belief that a guest should not expect better than that which the host has, but should, rather, accommodate himself to the conditions of his host. McMullan v. Butler, supra; Morgan v. Kirkpatrick, supra.
Massey argues that the pool was abnormally dangerous because it lacked a ladder at the deep end and a deep water warning rope, and that permitting Joan Massey to swim in it was evidence of wantonness. However, the undisputed evidence shows that Mrs. Wright did not give the children permission to swim in the deep water, but warned them specifically not to do so. Joan did not inadvertently wander into the deep water because of the lack of a warning rope, but ran around the pool and jumped into the deep water, against Mrs. Wright's instructions. Under the circumstances, we find no evidence of wantonness on the part of the defendants.
*172 In addition, Massey argues that there is evidence that Mrs. Wright was guilty of negligently injuring Joan Massey after she became aware of Joan's peril. He bases this argument on the testimony of plaintiff's expert that (1) the method of rescue chosen was not in conformance with good lifesaving procedures; (2) that a better method was easily available to Mrs. Wright, who testified that she knew how to swim; (3) that the available alternative was in conformance with proper lifesaving practice; and (4) that the method chosen actually worsened Joan's injury by delaying respiration and possibly forcing air from her lungs. Whether Mrs. Wright used proper rescue techniques is certainly in dispute, since the defendants' expert in water safety testified that the techniques used were proper. However, the undisputed evidence is that, before Mrs. Wright attempted to rescue her, Joan was lying unconscious on the bottom of the pool. If Mrs. Wright had undertaken no rescue, it is virtually certain that the child would have drowned. In Standifer v. Pate, 291 Ala. 434, 282 So.2d 261 (1973), this court quoted with approval from H.H. Parker & Brother v. Hodgson, 172 Ala. 632, 55 So. 818 (1911):
[W]hile a volunteer is not responsible for the failure or success of the act done by him, yet if by undertaking to do it, though it be voluntary, he brings about a state of affairs which results in injury that would not have occurred if he had not made the effort at all, he is liable.
Standifer v. Pate, 291 Ala. at 437, 282 So.2d at 264 (emphasis in original). While it is unclear whether some other method of rescue might have prevented or lessened the injury, it is clear that if Mrs. Wright had done nothing the injury would have been much worse. Under this standard, there is no evidence of injury caused by Mrs. Wright's action after discovering Joan's peril.

2.
In arguing the theory of attractive nuisance, the appellant relies on Tolbert v. Gulsby, supra, a case not involving a swimming pool, which he claims necessarily, albeit sub silentio, overruled the line of Alabama cases holding that the attractive nuisance doctrine does not apply to bodies of water. The appellant's reliance is misplaced. In Earnest v. Regent Pool, Inc., 288 Ala. 63, 257 So.2d 313 (1972), it was stated:
Of course, the attractive nuisance doctrine cannot apply under the facts presented in this count because the swimming pool, the dangerous condition complained of, is patent and obvious to the trespasser. It is well settled in Alabama that where the danger from the instrumentality which caused the injury is patent and obvious the doctrine of attractive nuisance is inapplicable. Republic Steel Corp. v. Tillery, 261 Ala. 34, 72 So.2d 719; Luallen v. Woodstock Iron & Steel Corp., 236 Ala. 621, 184 So. 182; Ford v. Planters' Chem. & Oil Co., 220 Ala. 669, 126 So. 866; Williams v. Bolding, 220 Ala. 328, 124 So. 892; Eades v. American Cast-Iron Pipe Co., 208 Ala. 556, 94 So. 593; Athey v. Tennessee Coal, Iron & Ry. Co., 191 Ala. 646, 68 So. 154; Alabama Great So. R.R. Co. v. Green, 276 Ala. 120, 159 So.2d 823; City of Dothan v. Gulledge, 276 Ala. 433, 163 So.2d 217.
Earnest v. Regent Pool, Inc., 288 Ala. at 66, 257 So.2d at 315-316.
In Glover v. City of Mobile, 417 So.2d 175 (Ala.1982), a post-Tolbert case, this court quoted from Bailey v. City of Mobile, 292 Ala. 436, 296 So.2d 149 (1974) in affirming a summary judgment on an attractive nuisance count:
[S]ummary judgment as to the count of attractive nuisance was properly entered by the trial court. In Bailey v. City of Mobile, 292 Ala. 436, 296 So.2d 149 (1974), this Court considered an action against the City for the drowning deaths of two children in a deep drainage ditch. The Court denied liability and held:
"Finally, this court said in Mayo v. Mobile Asphalt Co., 272 Ala. 442, 131 So.2d 881:

*173 "`We have held that water hazards are not dangerous instrumentalities and no legal duty is imposed on the owner of property to erect barriers, or other safeguards to protect children, not invitees, from water hazards. Cobb v. Lowe Mfg. Co., 227 Ala. 456, 150 So. 687.'"
Bailey, at 292 Ala. 439, 296 So.2d 149.
Glover v. City of Mobile, 417 So.2d at 178-179. In addition, there are other reasons to hold that attractive nuisance does not apply in the case before us. The doctrine of attractive nuisance, which offers an exception to the limited liability owed by a landowner to a trespasser, applies only where trespassing children are involved. Tolbert v. Gulsby, supra; Alabama Great Southern Railroad Co. v. Green, 276 Ala. 120, 159 So.2d 823 (1964). In Tolbert, this court noted that Gary Tolbert's deposition showed that "he was not attracted to Mr. Gulsby's carport because of the air rifle." Thus, summary judgment was held to have been properly granted for the defendant as to the attractive nuisance count.
In the case before us, it is equally clear that Joan Massey was not a trespasser attracted to the Wright's property by the attractiveness of the pool, but was a licensee, at the Wrights' home as a social guest, and in the swimming pool at their invitation. Thus, in this case, also, summary judgment for the defendants was appropriate as to attractive nuisance.

3.
The third theory argued by the appellant is that the swimming pool, having no warning rope or ladder as a means of egress, is a dangerous instrumentality. Again, Massey relies on Tolbert v. Gulsby, supra, in which this court stated:
This court has previously noted the similarity between Alabama cases using the straight negligence doctrine in relationship to trespassing children and Section 339, Restatement of Torts 2d; however, for clarity and certainty's sake now and in the future, this court adopts Section 339, Restatement of Torts 2d, as controlling, regardless of whether the children are licensees or trespassers.
Tolbert v. Gulsby, 333 So.2d at 135. Restatement (Second) of Torts § 339 (1965) provides:
A possessor of land is subject to liability for physical harm to children trespassing thereon caused by an artifical condition upon the land if
(a) the place where the condition exists is one upon which the possessor knows or has reason to know that children are likely to trespass, and
(b) the condition is one of which the possessor knows or has reason to know and which he realizes or should realize will involve an unreasonable risk of death or serious bodily harm to such children, and
(c) the children because of their youth do not discover the condition or realize the risk involved in intermeddling with it or in coming within the area made dangerous by it, and
(d) the utility to the possessor of maintaining the condition and the burden of eliminating the danger are slight as compared with the risk to children involved, and
(e) the possessor fails to exercise reasonable care to eliminate the danger or otherwise to protect the children.
We direct attention to the quotation from Glover v. City of Mobile, above, in which this court reaffirmed the long line of Alabama cases holding that water hazards are not dangerous instrumentalities. The appellant maintains that the lack of a deep water rope and ladder brings the Wrights' pool under the dangerous instrumentality theory. However, we point out that there is no evidence that these alleged defects in any way contributed to Joan Massey's injury, since all of the testimony of eyewitnesses indicates that Joan jumped into the deepest part of the pool, away from the sides, and made no effort to swim to the side or attempt to gain a handhold of any kind before losing consciousness. Thus, the theoretical danger caused by the absence of the ladder and rope is immaterial to this *174 case, and summary judgment for defendants is appropriate under the dangerous instrumentality theory.

4.
The appellant next attempts to claim that there was a higher duty of care owed by the Wrights than that owed by a landowner to a licensee, by alleging that they had undertaken a duty to supervise Joan Massey. In Standifer v. Pate, a case in which a volunteer babysitter allegedly allowed a small child in her care to pull a pan of hot grease off a counter, burning himself, this court held that a babysitter, by undertaking to supervise, watch, and care for a child, binds himself or herself to the exercise of due care in the execution of those services, independently of the duty arising from a landowner-licensee relationship. The negligent supervision standard was also applied in Walker v. Garris, 368 So.2d 277 (Ala.1979), where the defendant was holding a hayride for a church youth group.
We decline to reach the question of whether the negligent supervision standard extends to a situation where a minor was strictly a social guest in a defendant's home. Rather, we simply note that there is no evidence of negligence in Mrs. Wright's supervision of the children to defeat a motion for summary judgment, were such a standard applied here. All of the children who were present, except Joan, who did not remember the incident at all, reported that Mrs. Wright went to the pool with them and instructed them not to go into the deep water. They stated that Joan then ran to the deep end of the pool and jumped in, against Mrs. Wright's instruction. We find in this testimony no evidence of negligent supervision.

5.
Massey's final argument is that the actions of the Wrights amounted to negligence per se, in that they failed to conform to a city ordinance by failing to submit plans for the pool to the building inspector, failing to obtain a building permit, failing to obtain a pre-occupancy inspection, and, on May 23, 1980, by permitting swimmers in deep water which had no ladder. He argues that the failures proximately caused Joan's injuries.
We reject this argument, also. This court has said many times that although it is generally accepted that violation of statutes or ordinances may be negligence, in order to recover, a causal connection must be established between the violation and injury. See Vines v. Plantation Motor Lodge, 336 So.2d 1338 (Ala.1976). See also Fox v. Bartholf, 374 So.2d 294 (Ala.1979); Robbins v. Voight, 280 Ala. 207, 191 So.2d 212 (1966); Winfrey v. Witherspoon's, Inc., 260 Ala. 371, 71 So.2d 37 (1954). Although Massey argues in his brief that the failure of the Wrights to have a ladder at the deep end of the pool was a proximate cause of the injury, the undisputed testimony of the witnesses to the incident was that Joan jumped out away from the edge of the pool and had made no effort to swim back to a point where she might have reached a ladder, had there been one, before she apparently suffered a seizure and lost consciousness.
For all of the above reasons, the judgment of the trial court must be, and hereby is, affirmed.
AFFIRMED.
TORBERT, C.J., and MADDOX, FAULKNER, ALMON, SHORES, EMBRY and BEATTY, JJ., concur.
JONES, J., concurs in the result.
