Hello,

I want to click the skip ad buttom when the buttom appears, can someone please explain me how this can be done using jquery?

Here is the Code

<!DOCTYPE html>
<html>
<body style="margin:0px;padding:0px;">

<iframe src="http://bc.vc/7VsNj6" style="width:100%; height:100%; border:none;" id="frame">
  <p>Your browser does not support iframes.</p>
</iframe>

</body>
</html>

Thanks in advance.

Troy III commented: A correct & working code has been given to you - you need to say "THANK YOU!" and mark your thread as "Solved!" -2

There are no links in the code provided.

In any case, I assume what you mean is that you are visiting a web page and you want that link to be clicked automatically.

What is your plan to do this? Use some type of browsing app that let's you inject your own client side code?

Please elaborate and clarify.

I wrote you this:

;(function f(){find("skip ad")?getSelection().anchorNode.parentElement.click():setTimeout(f,1000)})();

copy-paste it on the page that needs to skip the ad and tell us how it went.

More info on Javascript timing events can be found here. I guess you could use the setTimeout() function. E.g.:

var timeout_time_in_seconds = 10;
var timeout = setTimeOut(function()
{
    //* Type here what needs to happen after the timer times out.

}, (1000 * timeout_time_in_seconds));
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.