applying a var to an if statement jquery
Posted
by Dirty Bird Design
on Stack Overflow
See other posts from Stack Overflow
or by Dirty Bird Design
Published on 2010-06-18T00:23:02Z
Indexed on
2010/06/18
0:33 UTC
Read the original article
Hit count: 201
jQuery
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
? Do I even need the $(this).ready(function ()...
part? I need it to apply the var
when #stepDesc0
has the class current
.
© Stack Overflow or respective owner