Hello all! I'm trying to add a blank space in the following.
$('.post_name'+post_id+'').hide();
So it will render something similar to
post_name 8
I tried adding '' and " " but they don;t work. Can someone please help me?
Hello all! I'm trying to add a blank space in the following.
$('.post_name'+post_id+'').hide();
So it will render something similar to
post_name 8
I tried adding '' and " " but they don;t work. Can someone please help me?
Use:
$('.post_name ' + post_id)
Result will be like post_name 8
Make sure that your selector works in such format :) Let's know if you have any problems with the selector.
Have you tried:
selector = 'post_name '+post_id;
$(selector).hide();
That might make it a little more extensible.