Is
Check the current matched set of elements against a selector and return true if at least one of these elements matches the selector.
<div>
<div class="testIs" style="cursor:pointer">Click me</div>
<span class="testIs" style="cursor:pointer">Click me</span>
<br>
<input class="testIs" type="button" id="btnRunHas" value="Click me" />
<?php
echo
YsJQuery::newInstance()
->onClick()
->in('.testIs')
->execute(
sprintf(
'if(%s){
alert("Yes, I am a button")
}else{
alert("No, I am not a button")
}',YsJQuery::is('input:button')->in('this'))
)
?>
</div>
Click me
Click me

Support requests, bug reports, and off-topic comments will be deleted without warning.