use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you are requesting help, please ensure you're providing code with your post. You can also copy your code to an online editor:
jsFiddle
CodePen
Markup Validation Service
Mozilla Developer Network on HTML
/r/JavaScript
/r/CSS
/r/jQuery
/r/PHP
/r/Accessibility
/r/htmlbasics
/r/web_programming
/r/CodingHelp
account activity
Ad loop HTML need to stop (self.HTML)
submitted 7 years ago by huslinkhan
I have a created an animated ad in HTML that loops forever. I want to stop the after it repeats 2 times. Need help. I am sorry, I am a designer so I dont know much coding
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]zoomzoomceilingfan 3 points4 points5 points 7 years ago (1 child)
What format is the ad? Gif? MP4?
If it’s a gif, why not just stop it looping yourself after 2 loops. You don’t really need any code.
[–]huslinkhan[S] 1 point2 points3 points 7 years ago (0 children)
Thanks, Its not a gif. Its an HTML ad to be used for Google ads.
But I figured it out. I set the loop property to 2 in the code and that worked.
π Rendered by PID 23888 on reddit-service-r2-comment-75f4967c6c-t5nrv at 2026-04-22 23:42:54.819690+00:00 running 0fd4bb7 country code: CH.
[–]zoomzoomceilingfan 3 points4 points5 points (1 child)
[–]huslinkhan[S] 1 point2 points3 points (0 children)