jquery list item class toggle

后端 未结 5 2141
悲哀的现实
悲哀的现实 2021-02-11 08:19

I have a simple function to toggle list item class from \"active\" to \"inactive\". What is the most efficient way (i.e., using the least amount of code) to set all other list i

5条回答
  •  别那么骄傲
    2021-02-11 08:46

    If you're already using jQuery UI, you can take advantage of the selectable function. That would get you what you want with the least amount of code. http://jqueryui.com/selectable/

提交回复
热议问题