Hi everybody,
I have a problem with this fonction:
function test(value){
var id = "'" + value + "'";
$(id).remove();
}
It gets an "Id", add simple quotes and then call the remove function.
The "value" is a generated id by php. For example, I can have:
$var = "$the_id";
When the "test" function is triggered by a click, I get te following error:
Uncaught Syntax error, unrecognized expression: ''
I thought it's because the function cannot get the id. But when I insert an alert in the function ( alert (id) ), it returns the right "id" with the good format ( '#the_id').
How can solve this problem?
Thank you,
regards.