Javascript examples for jQuery:Tag Traversing
contains (*) jQuery selector
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(window).load(function(){/*from www. j a v a 2s . co m*/ var isChecked = $('.yleis span.radio[style*="-50"]').length?true:false; console.log(isChecked); }); </script> </head> <body> <div class="yleis"> <span class="radio" style="background-position: 0px -50px;"></span> </div> </body> </html>