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

Was it helpful?

Solution 2

Use attribute-equals-selector

jQuery('input[value="30s"]').click();

OTHER TIPS

You can use Attribute Equals Selector [name="value"]

Live Demo

$(':button[value="30s"]').click();
$('input[value="30s"]').click();

You need to use selector on attibute and also call click when page is loaded:

$(function(){$('input[value="30s"]').click();})

FIDDLE

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top