applying var to a if statement

applying var to a if statement

Need to apply a var to a statement if its conditions are met, this syntax isn't throwing errors but its not working.

<script type="text/javascript">
$(document).ready(function(){
  var action_is_post = false;
      //stuff here
    $(this).ready(function () {
        if ($("#stepDesc0").is(".current")) {
        action_is_post = true;     
        }
    });
  //stuff here
</script>

should I use something other than .ready? I need it to apply the var when #stepDesc0 has the class current.

Thanks!