jQuery('input[value="30s"]').click();
Jquery Programatically Click button with no unique id or class
-
17-07-2023 - |
Question
Here is the HTML of the button i would like to click:
<div style="" class="widgetPlaceholder widgetExpireTurbo" data-widget="turboBinary_tradologic_expireTurbo">
<input type="button" value="15s" class="expireTurboRuleInterval activeRule" data-ruleid="149">
<input type="button" value="30s" class="expireTurboRuleInterval" data-ruleid="148">
<input type="button" value="45s" class="expireTurboRuleInterval" data-ruleid="147">
<input type="button" value="1m" class="expireTurboRuleInterval" data-ruleid="106">
<input type="button" value="2m" class="expireTurboRuleInterval" data-ruleid="107">
<input type="button" value="5m" class="expireTurboRuleInterval" data-ruleid="108">
</div>
I wish to click the button with the value="30s"
progmatically via jquery.
Here is the URL: https://binarykings.co.uk/traderoom-aspx?game=turbo&view=single&lang=en&filter=currencies
Thanks
Solution 2
OTHER TIPS
$('input[value="30s"]').click();
You need to use selector on attibute and also call click when page is loaded:
$(function(){$('input[value="30s"]').click();})
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow