I have a variable which I define by:
if($(this).hasClass('firstName')){
lastname = $(this)
current='.first-name'
}
I have to use this variable in jQuery selector. I tried the following but it doesn't work:
$('.invitePartners' + current + '[data-index]')
$('.invitePartners.first-name[data-index]'), show the whole code and exactly what are you trying to achieve.varwhen appended/concatenated will look like above, which looks valid.