Here is my Code i just want to change x value on click if it is x then change y ..if it is y then change to x again but after become y value cant change to x .. the control is always on 3rd section .. whats wrong
jQuery(document).ready(function(){
var x;
$(".ticktack tr td").click(function(){
if(x == null){
alert('section 1' );
x = 'X';
}
else if(x == 'X'){
alert('section 2');
x = 'Y';
}
else if(x == 'Y'){
alert('section 3');
x == 'X';
}
$(this).html(x);
})
});