Passing value from function to other function as selector value
Hi all,
I have problem with following script:
- $(document).ready(function(){
id = 'test';
$('#Name').keyup(function(){
id = '#Mobil';
});
- $(id).click(function(){
console.log(id);
});
});
Console.log has right value "#Mobil" but $(id) is using value "Test". I need there value "#Mobil" like console.log has. Thx for help.