Quantcast
Channel: DaniWeb Solved Topics
Viewing all articles
Browse latest Browse all 564

Have Javascript click a button upon onload

$
0
0

I'd like for my page (https://fiftyallstars.com/tour.html) to load, and for the TOUR to start automatically. Right now visitors must click a button with id "starttour"

Here's what I've added so far, but it doesn't do the trick:

<script>
 $(function () {
          window.onload = $('#starttour').click();
      });
</script>

<a class="start-tour" href="#" id="starttour"><span class="two skinny" style="margin:10px 5px; width:290px; font-weight:bold; letter-spacing:4px;"><i class="fa fa-photo animated faa-pulse faa-slow"></i> Take a Detailed Tour</span></a>

Thanks for any help whatsoever.


Viewing all articles
Browse latest Browse all 564

Trending Articles