Variable in Select not update
Hi,
im whit this code
- var num=1;
- var num2;
- $(document).ready(function(){
-
- $('.cntrlr-'+num+'-ok').on('click', function() {
- num2=num+1;
- $('.scnr-'+num).addClass('hidden');
- $('.scnr-'+num2).removeClass('hidden');
- num=num+1;
- });
The problem is into
$('.cntrlr-'+num+'-ok'), only go when the class of object clicled is 1 (.
cntrlr-'1'-ok'). The num variable change correctly but the
$('.cntrlr-'+num+'-ok') not update.
Thanks,