jQuery variable to ID issue

后端 未结 1 1911
长情又很酷
长情又很酷 2021-01-23 20:54

I have buttons with a class named nav, when a button is clicked the ID is read and the variable \"pre\" is set to the ID. Once the variable is set I\'m removing part of the id,

相关标签:
1条回答
  • 2021-01-23 21:11

    You don't need the quotes around it, that's the problem.

    $('#'+ pre)
    
    0 讨论(0)
提交回复
热议问题