Passing value from function to other function selector
Hi all,
I have issue with passin value between functions:
- $(document).ready(function(){
id = 'test';
$('#Meno').keyup(function(){
id = '#Mobil';
});
-
- $(id).click(function(){
console.log(id);
});
});
I am getting from console.log right value "#Mobil" but $(id) has value "Test". I need there also value "#Mobil".
Any idea what I am doing wrong?