using variable with jquery selector
问题 I have following lines of code and I want to use visibleoffer variable as selector. How can I concatenate it? var visibleoffer = '.' + obj.parents('tbody').attr('providername') + ' .visible-offers'; //visibleoffer = .Txy .visible-offers $(obj).parents('.Provider').find(".Offers:not(.HideByProviderFilter,.HideByMainFilter,.HideByProviderFilter.HideByMainFilter,+ visibleoffer)").length; So it becomes: $(obj).parents('.Provider').find(".Offers:not(.HideByProviderFilter,.HideByMainFilter,