I need this button to be automatically "pressed" when entering the site, or after X seconds.
<button id='settingsTab' class='all'>||</button>
<div id='settingsContainer'>
<div id='channelInput' style='position:absolute;top:15px;font-size:0;width:330px;'>
<input type="text" id="channel" style='width:215px;' name="channel" value='sodapoppin'>
<button id='join'>Join</button>
</div>
</div>
Is this possible, having the "join" button being sent by just entering the site?
Also, im pretty new to this!
Is this possible, having the "join" button being sent by just entering the site?
yes it is possible. You will have to use the setTimeout
function of javascript
or Jquery
to achieve this. Also wrap your code in a document ready function so that it executes only when the document has been fully loaded. Make sure to put all your javascript/jquery code within a script
tag.
Here is a sample code (in Jquery):
<script>
$(document).ready(function(){
setTimeout(function(){ $("button#join").click(); }, 2000); /* after 2 seconds */
});
</script>